GCC beaten by ICC in stupid trig test!

Per Abrahamsen abraham@dina.kvl.dk
Tue Mar 16 08:45:00 GMT 2004


dewar@gnat.com (Robert Dewar) writes:

> 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!

Not really, the sin**2+cos**2 may often be more readable, and may be
hidden behind some inlined functions.

Please do not assume that "real arithmetic" optimizations have already
been performed by the programmer by hand.  And please do not
discourage people from implementing them.  If you must, insist they
are only enabled by a flag for use by those of us who want the
compiler to do such optimizations.



More information about the Gcc mailing list