This also applies to log2, log10.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
The one thing that's a little bit weird here is cases like x = -1, y = 4; log(pow(-1, 4)) is 0, but 4*log(-1) is NaN. That's a dramatic difference even for fast-math. Do we find exact integer exponents before we get to this point?
Comment Actions
Yes, that's a little bit unfortunate. I don't think we find exact exponents before we get to this point. Do you think it's a showstopper to get this patch into the tree? By the way, I also noticed gcc produces the same very ouput on your testcase, for what it's worth.