Re: /tset/ANSI.os/maths/pow/T.pow 4
Matt Wilson wrote:
> From lsb-distribution-test-1.1.3-1
>
> ************************************************************************
> /tset/ANSI.os/maths/pow/T.pow 4 Warning
>
> Test Information:
> pow(0.0, -1.0) gave
> RETURN VALUES: expected: -inf, observed: inf
> Bit Representation: expected value: \000\000\000\000\000\000\360\377
> Bit Representation: observed value: \000\000\000\000\000\000\360\177
>
> ************************************************************************
>
> Isn't pow(0.0, -1.0) undefined? From the looks of C99, pow(long
> double x, long double y) may cause a domain error if x is zero and y
> is less than or equal to zero.
For IEEE F.P. systems, C99 says (F.9.4.4):
pow(+-0, y) returns +-infinity and raises the "divide-by-zero"
floating point exception for y an odd integer < 0.
So the problem with the test is that it expects the wrong sign
for the infinity returned given the information in your message.
--
Dave Prosser dfp@caldera.com (908)790-2358 Caldera, Murray Hill, NJ
Reply to: