[Bug math/20916] New: pow handling of sNaN arguments
jsm28 at gcc dot gnu.org
sourceware-bugzilla@sourceware.org
Fri Dec 2 19:05:00 GMT 2016
https://sourceware.org/bugzilla/show_bug.cgi?id=20916
Bug ID: 20916
Summary: pow handling of sNaN arguments
Product: glibc
Version: 2.24
Status: NEW
Severity: normal
Priority: P2
Component: math
Assignee: unassigned at sourceware dot org
Reporter: jsm28 at gcc dot gnu.org
Target Milestone: ---
Various pow function implementations mishandle sNaN arguments in various ways.
This includes returning sNaN instead of qNaN for sNaN arguments. For arguments
(1, sNaN) and (sNaN, 0), TS 18661-1 semantics are also that the result should
be qNaN, whereas with a qNaN argument there the result should be 1.
Some representative examples for double for x86_64 follow; the detailed
failures vary between implementations. This bug specifically excludes any
issues for float and double for 32-bit x86, given the problems with testing
sNaNs in those cases.
Failure: Test: pow (sNaN, 0)
Result:
is: 1.0000000000000000e+00 0x1.0000000000000p+0
should be: qNaN
Failure: Test: pow (sNaN, qNaN)
Result:
is: sNaN
should be: qNaN
Failure: Test: pow (0, sNaN)
Result:
is: sNaN
should be: qNaN
Failure: Test: pow (1, sNaN)
Result:
is: 1.0000000000000000e+00 0x1.0000000000000p+0
should be: qNaN
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list