* FP Computations
@ 1999-09-04 6:52 David McClain
0 siblings, 0 replies; only message in thread
From: David McClain @ 1999-09-04 6:52 UTC (permalink / raw)
To: caml-list
Ohmygosh! I just ran a simple proof checker in Mathematica against the IEEE
FP spec with distinct (+0.0) and (-0.0). Do you realize that subtraction no
longer anti-commutes?
That is, in general there is no way to perform (a -. b) as a correction to
(b -. a). Subtraction almost anti-commutes, except when a = b. In that case
(a -. b) = +0.0, and (b -. a) = +0.0 also! Hence we cannot expect that
(a -. b) = -. (b -. a).
Also can't use (-0.0) -. (b -. a) since that's exactly the same as direct
negation with FCHS.
Can't use (+0.0) -. (b -. a) since a might be -0.0 and b might be +0.0 in
which case (a -. b) = -0.0 and (b -. a) = (+0.0), and hence (+0.0) -. (b -.
a) = (+0.0) -. (+0.0) = (+0.0).
We're stuck! We MUST evaluate (a -. b) in the order indicated because there
is in general no way to correct the reverse order. Yikes!
- DM
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1999-09-06 8:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-04 6:52 FP Computations David McClain
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox