On to Hydro

Jonathan S. Shapiro shap@eros-os.org
Wed, 23 Aug 2000 11:04:33 -0400


> I don't know about IEEE floats but when it comes to reals 0 = -0.
>
> All mathematicians agree that between any two distinct reals there
> lies another real distinct from both. What is between 0 and -0 if
> they are distinct?
>
> Not that this bears on the decision at hand.

In IEEE, the value 0.0 is at best an approximation. The distinction between
+/- zeros allows for the possibility of roundoff error leading to a zero
result.

> My two cents are that you should either conform slavishly to IEEE
> (ugh) or provide a total ordering so that sorts work. (Actually you
> could do both, perhaps even provide a function of two reals!)

You should conform slavishly to the IEEE standard by default unless you can
(a) conclusively show that your solution is better and (b) provide a
straightforward means to emulate IEEE behavior with zero cost in order to
run real programs.