[squeak-dev] Re: [ANN] Number comparison, hash, NaN, Point,
and other partially ordered sets
andreas.raab at gmx.de
Wed Jan 7 06:33:57 UTC 2009
Eliot Miranda wrote:
> I used to think the same (at least for infinity & infinitessimal) but no
> longer.. 1 / 0 ~= (Float maxVal * 2). At first the IEEE rules may seem
> counter-intuitive but they have been well thoguht-out. They provide
> safety for computations that go out of range. Correctness (in this case
> lack of false positives) is much more important than "naturalness".
I agree. But correctness can also mean that neither 1 / 0 nor Float
maxVal * 2 should be allowed to successfully execute primitively.
> The experience with VisualWorks where we changed over to IEEE (with Inf
> & NaN) was rthat those people who really cared avbout float arithmetic
> and knew what they were talking about really wanted IEEE behaviour and
> did not at all want abstract Infinity Infinitessimal or NaN. One thing
> they wanted was easy interoperability (e.g. with high-performance
> libraries), which means sticking to IEEE. Introducing abstract
> Infinity/Infinitessimal/NaN complicates the glue and slows it down.
Interesting data point. I'm really torn in this area - it seems like
such a broken behavior to have a ~= a.
More information about the Squeak-dev