NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: lib/49240: Some corner cases for pow() fail to work correctly
The following reply was made to PR lib/49240; it has been noted by GNATS.
From: Havard Eidnes <he%NetBSD.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: lib/49240: Some corner cases for pow() fail to work correctly
Date: Sat, 04 Oct 2014 16:24:18 +0200 (CEST)
Hmm.
It appears that we build a "multi-standard fdlibm as libm", and that
we by default implement _POSIX_MODE (ref. src/lib/lim/Makefile).
So ... the test program, if it should test the IEEE compliance for the
corner cases, needs to tell libm to do the IEEE operations instead of
the POSIX operations via
_LIB_VERSION =3D _IEEE_;
(is that the officially sanctioned method, BTW?)
and the only failures flagged by the test program I posted earlier
which our original libm then fail with is
Test failure: 1.0 =3D=3D pow(-1, Infinity)
a =3D=3D 1.000000
b =3D=3D nan
Test failure: 1.0 =3D=3D pow(-1, -Infinity)
a =3D=3D 1.000000
b =3D=3D nan
which correspond to this change:
* Add a case for -1**+-Inf, since C99 and IEEE 754 revised 2008(?)
reportedly state that this should be 1
Further, it looks like the reason for the "yy1" variable name is that
a use of "y1" appears to mask a global "y1", at least on netbsd-6.
Test cases to justify the other changes should be found.
Regards,
- H=E5vard
Home |
Main Index |
Thread Index |
Old Index