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!
- From: dewar at gnat dot com (Robert Dewar)
- To: coyote at coyotegulch dot com, pinskia at physics dot uc dot edu
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 15 Mar 2004 11:06:50 -0500 (EST)
- Subject: Re: GCC beaten by ICC in stupid trig test!
> 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!