Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

general conversions of floats to intervals



Kreinovich, Vladik wrote:
> Yes, I meant conversion of strings to intervals, because a floating
> point 1.5 and 1.50 is the same, so this has to be done with strings.

Decimal FP does distinguish those two; one has quantum 1e-1 and the
other has quantum 1e-2, and this is preserved in the encoding.

Nevertheless, it would be foolish to implement DFP->Interval conversion
as anything but point conversion, since exact DFP arithmetic preserves
the quantum, and 1.500000000000000 (in Decimal64) is likely to be the
rounded result of an inexact computation (being normalized to 16 digits),
whereas 1.5 could only have resulted from an exact operation such as 3/2.

In reply to Vladic, Baker Kearfott wrote:
> I'm beginning to think of arguments in favor of including it, too.

If so, you'll need a syntactic indicator.  Ah, but haven't we seen that
already, as in "1.5x" vs. "1.5?"  (exact vs uncertain numbers)?  So the
only issue would be what a naked "1.5" should imply.  Would the standard
really leave this as an implementation choice?

Michel.
Sent: 2008-11-11 23:30:50 UTC