This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] More constant folding of math built-ins.
- From: Roger Sayle <roger at eyesopen dot com>
- To: Brad Lucier <lucier at math dot purdue dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 28 May 2003 21:53:28 -0600 (MDT)
- Subject: Re: [PATCH] More constant folding of math built-ins.
>> 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 Sayle, E-mail: email@example.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