Questions about NCEG

Larry Jones scjones at sdrc.UUCP
Tue Jun 5 04:33:46 AEST 1990


In article <15576 at bfmny0.BFM.COM>, tneff at bfmny0.BFM.COM (Tom Neff) writes:
> >"If the scaled value is in the range of representable values (for its
> >type) the result is either the nearest representable value, or the
> >larger or smaller representable value immediately adjacent to the
> >nearest representable value, chosen in an implementation-defined manner."
>  ^^^^^^^^^^^^^^^^^^^^^
> Does anyone else think this word choice is strange?  I can understand
> dealing with values outside the domain of exactly representable numbers
> in this way -- let the compiler round up, down or to nearest as it sees
> fit -- but if the target value is exactly representable, surely that
> representation's use should be mandatory.

As I recall, it was pointed out to us by someone far wiser in the
matters of floating point than we, that requiring the compiler to
get it exactly right was nearly impossible.  Apparently, there
are some values which would require (nearly?) infinite precision
arithmetic to get exactly right.  Even getting it to within one
bit is exceedingly hard, which is why the standard allows for
either of three values rather than just two.
----
Larry Jones                         UUCP: uunet!sdrc!scjones
SDRC                                      scjones at SDRC.UU.NET
2000 Eastman Dr.                    BIX:  ltl
Milford, OH  45150-2789             AT&T: (513) 576-2070
"You know how Einstein got bad grades as a kid?  Well MINE are even WORSE!"
-Calvin



More information about the Comp.std.c mailing list