Bug#182574: libc6: The pow() function gives incorrect results on special cases (nan, inf...)
At Wed, 26 Feb 2003 17:49:16 +0100,
Vincent Lefevre wrote:
> I get the following results:
>
> 1) pow(-inf, nan) = inf
> The result should be nan (however, pow(inf, nan) is correct: nan).
I also think it should be NaN.
> 2) pow(-inf, 0.5) = inf
> pow(-inf, -0.5) = 0
> The result should be nan in both cases.
No.
pow(-inf, y) returns +inf for y > 0 and not an odd integer.
pow(-inf, y) returns +0 for y < 0 and not an odd integer.
So, it's fully satisfied ISO C99.
> 3) pow(-1, inf) = 1
> pow(-1, -inf) = 1
> I think that the result should be nan in both cases.
Yes, it should be NaN.
Are you OK for my analysis?
BTW, I don't have IEEE 754 specification; so please tell me
the correct behavior of IEEE 754 if you have it. I need it
to fix this bug.
Regards,
-- gotom
Reply to: