[llvm-commits] [llvm] r49458 - /llvm/trunk/lib/Transforms/IPO/SimplifyLibCalls.cpp
Bill Wendling
isanbard at gmail.com
Thu Apr 10 02:57:50 PDT 2008
On Apr 10, 2008, at 1:58 AM, Duncan Sands wrote:
>> + // x pow(x, 0.5) sqrt(x)
>> + // ---------------------------------------------
>> + // -0.0 +0.0 -0.0
>> + // -inf +inf NaN
>
> looks like pow is broken. Is pow's behaviour documented
> anywhere? On my machine the man page says:
>
> The pow() function can return the following error:
>
> EDOM The argument x is negative and y is not an integral
> value. This would result in a complex num‐
> ber.
>
> Are you sure errno is not being set by pow in these cases?
>
This is what we have on Darwin:
...
pow(x, y) returns a NaN and raises the "invalid" floating-point
exception for finite x < 0 and finite non-integer y.
...
The man page says nothing about errno. It claims to follow this
standard:
The pow() function conforms to ISO/IEC 9899:1999(E).
-bw
More information about the llvm-commits
mailing list