Re: Edge case conversions, exceptions to IEEE FPA
On Tue, 2008-11-11 at 05:03 -0800, R. Baker Kearfott wrote:
> Yes. I agree with your philosophy, and I also accept your
> correction. I was thinking of converting '0.1' to a binary
> format. Of course, if we convert '0.1' to a decimal
> format, my view would be that it should be a singleton
> interval, consistent with the rounding modes specified
> in 754-2008.
In decimal FP, "0.1" can be converted exactly but 1/3, when approximated
by "0.3333333" cannot be. Both textual strings can be converted exactly
to decimal FP numbers, but the programmer might know that even so the
latter is not exact, and ought to be able to say so.
If the standard only provides one function to convert textual numbers to
FP intervals, should the argument be considered to be exact or inexact?
The programmer might know, and should be allowed to tell the program
(which doesn't know). If the programmer doesn't know, a conservative
guess is that it's inexact.
--
Van Snyder | What fraction of Americans believe
Van.Snyder@xxxxxxxxxxxx | Wrestling is real and NASA is fake?
Any alleged opinions are my own and have not been approved or
disapproved by JPL, CalTech, NASA, the President, or anybody else.