This is the mail archive of the
mailing list for the GCC project.
Re: Fourth Draft "Unsafe fp optimizations" project description.
- To: Brad Lucier <lucier at math dot purdue dot edu>
- Subject: Re: Fourth Draft "Unsafe fp optimizations" project description.
- From: Jason Riedy <ejr at CS dot Berkeley dot EDU>
- Date: Mon, 13 Aug 2001 11:20:21 -0700
- cc: gcc at gcc dot gnu dot org
And Brad Lucier writes:
- It is true that -0.0 is numerically equal to 0.0, but it not (Lisp)
- equivalent, in that 1.0/(0.0) is most definitely not (numerically equal ||
- equivalent || or identical) to 1.0/(-0.0).
Yes. However, the _only_ two ways to determine the sign of
zero (short of bitops) are copysign and division. The sign
is meant to be ignored 99.9999% of the time. These
transformations _may_ be reasonable in a default mode if
they allow good optimizations.
The original 754 proposal also included a projective mode
where there was only one infinity. In that case, the only
way to see the sign was copysign. Alas, it went away,
horribly complicating complex arithmetic.