No subject
uunet!research.att.com!dmg
uunet!research.att.com!dmg
Thu Jan 21 06:53:00 PST 1993
to- nceg (ncegacray.com)
from- David M. Gay
re- 1.0e9999999
Contrary to Tydeman's assertions (of 20 Jan. 1993, "A brief
follow-up on IEEE floating-point"), when overflow trapping is
masked off, the binary IEEE arithmetic standard (P754) requires,
e.g., 1.0e999 to round to +Infinity (in the default round-nearest
or the round-upward modes, or to DBL_MAX in round-toward-zero or
round-downward modes), with the overflow flag being set in the
process. P754 doesn't require conversion of 1.0e9999999
(because it only requires conversions for a limited exponent
range), but the only sensible course is to admit an unbounded
exponent range and to round 1.0e9999999 the same way as 1.0e999.
It would violate the principle of least surprise to round
1.0e999 to +Infinity and 1.0e9999999 to DBL_MAX.
-- dmg
More information about the Numeric-interest
mailing list