This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC beaten by ICC in stupid trig test!
On Tue, Mar 23, 2004 at 10:32:13PM -0500, Robert Dewar wrote:
> Well I don't know exactly what stuff is in -ffast-math, but I suspect it
> is a mistake to just think in terms of rounding error vs the mantissa
> length.
Most of the optimizations have to do with ignoring the need to distinguish
+0 and -0, or handle NaNs.
> For example, if -ffast-math is so sloppy as to consider
> that (a+b)+c can be replaced by a+(b+c), then all bets are off.
That's why -ffast-math doesn't do that; such a transformation would be
massively brain-damaged. Please don't post speculation as to what
-ffast-math does, when that speculation will scare people away from using
what is sometimes the right tool for the job.
Reading the manual can be quite educational. -ffast-math is actually the
combination of five separate shortcuts, which can be enabled or disabled
individually: -fno-math-errno, -funsafe-math-optimizations,
-fno-trapping-math, -ffinite-math-only and -fno-signaling-nans