[squeak-dev] Re: [ANN] Number comparison, hash, NaN, Point, and
other partially ordered sets
hmm at heeg.de
Thu Jan 8 15:30:21 UTC 2009
Tim Olson schrieb:
> (a * b) performs a double-precision rounding step after the multiply,
> while ((a d2e * b d2e) e2d) performs an extended-precision rounding
> step after the multiply, then another double-precision rounding step
> in the conversion back to double-precision. This will result in a
> difference in the final values in many cases.
> There is a mode bit in x86 to cause the intermediate rounding to be
> done with double-precision instead of extended-precision, but that
> does not limit the exponent range to the double-precision range, so
> denormal results may still be different.
AFAIK, the Croquet project needs to have exactly reproducible float
arithmetics on all platforms. Would these rounding effects on the x86
affect that goal (perhaps with denormal intermediate results)?
Maybe it would be nice to write a unit test which would uncover
different rounding behaviors between purely-double-precision FP hardware
and extended-precision hardware.
More information about the Squeak-dev