Re: /tset/ANSI.os/maths/pow/T.pow 4
Dave Prosser wrote:
>
> 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.
And the SUSv2 that the LSB refers to also says there are mutiple answers:
http://www.opengroup.org/onlinepubs/007908799/xsh/pow.html
>
> 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
>
> --
> To UNSUBSCRIBE, email to lsb-test-request@lists.linuxbase.org
> with subject of "unsubscribe". Trouble? Email listmaster@lists.linuxbase.org
--
George Kraft IV
gk4@austin.ibm.com
Reply to: