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] Optimize pow(x,0.0) = pow(1.0,y) = 1.0


Did you know that pow(0.0, 0.0) != 1.0?


On Thursday, Feb 20, 2003, at 20:10 US/Pacific, Roger Sayle wrote:


The following patch implements the built-in constant folding optimizations
that "pow(x,0.0) = 1.0" and "pow(1.0,y) = 1.0", even when x and/or y are
NaN. There are plenty more optimizations to come, but the patch below is
large enough as it is.

Also does you patch work when fast-math is off, it looks like it does so you should have a test case for all, including -O0 instead?



Thanks, Andrew Pinski apinski at apple dot com pinskia at physics dot uc dot edu


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