This is the mail archive of the gcc-patches@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: [PATCH] More constant folding of math built-ins.


Hi Brad,
>> The following patch implements some more constant folding optimizations
>> of GCC's mathematical builtins.  We now optimize ... atan(tan(x)) = x
>> (with -funsafe-math-optimizations) ...
>
> This is hardly getting a corner case wrong or missing a rounding or getting
> the sign of zero wrong.  Did you really mean to do tan(atan(x))=x?

Doh!!  Arggh.  I'd managed to convince myself that atan(tan(x)) was the
identity and tan(atan(x)) wasn't.  Looks like I've goofed and got them
the wrong way around.  Very many thanks for catching this!  Sorry for
the inconvenience, I'll resubmit a corrected patch tomorrow after the
usual bootstrapping and regression testing.

Roger
--
Roger Sayle,                         E-mail: roger@eyesopen.com
OpenEye Scientific Software,         WWW: http://www.eyesopen.com/
Suite 1107, 3600 Cerrillos Road,     Tel: (+1) 505-473-7385
Santa Fe, New Mexico, 87507.         Fax: (+1) 505-473-0833


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