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]
Other format: [Raw text]

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!


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