Fourth Draft "Unsafe fp optimizations" project description.

Jason Riedy ejr@CS.Berkeley.EDU
Mon Aug 13 11:20:00 GMT 2001


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.

Jason



More information about the Gcc mailing list