This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Fourth Draft "Unsafe fp optimizations" project description.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]