GCC beaten by ICC in stupid trig test!

Robert Dewar dewar@gnat.com
Mon Mar 15 16:06:00 GMT 2004


> The point here if you know that it is 1.0 then just return 1.0 instead 
> of trying to
> play tricks with trig functions.

optimziations like this are inappropriate in my view. We are dealing
with floating-point not real arithmetic.

Indeed if any programmer writes sin**2+cos**2, one can assume that the
intention is precisely to get the computed value that may not be 1.0. If
the programmer wants 1.0, they can write it explicitly!



More information about the Gcc mailing list