[Bug math/20940] New: hypot sNaN handling

jsm28 at gcc dot gnu.org sourceware-bugzilla@sourceware.org
Tue Dec 6 22:48:00 GMT 2016


https://sourceware.org/bugzilla/show_bug.cgi?id=20940

            Bug ID: 20940
           Summary: hypot sNaN handling
           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: ---

Signaling NaN semantics mean that hypot functions, when one argument is an
infinity and the other is a signaling NaN, should return qNaN with "invalid"
raised, as specified in TS 18661-1, rather than returning +Inf as done for
arguments (Inf, qNaN).  Various implementations in glibc do not follow those
semantics.  E.g., for double on x86_64:

Failure: Test: hypot (inf, sNaN)
Result:
 is:          inf   inf
 should be:  qNaN
Failure: Test: hypot (inf, -sNaN)
Result:
 is:          inf   inf
 should be:  qNaN
Failure: Test: hypot (-inf, sNaN)
Result:
 is:          inf   inf
 should be:  qNaN
Failure: Test: hypot (-inf, -sNaN)
Result:
 is:          inf   inf
 should be:  qNaN
Failure: Test: hypot (sNaN, inf)
Result:
 is:          inf   inf
 should be:  qNaN
Failure: Test: hypot (-sNaN, inf)
Result:
 is:          inf   inf
 should be:  qNaN
Failure: Test: hypot (sNaN, -inf)
Result:
 is:          inf   inf
 should be:  qNaN
Failure: Test: hypot (-sNaN, -inf)
Result:
 is:          inf   inf
 should be:  qNaN

This bug excludes any issues with the float and double implementations for
32-bit x86, given the problems with testing sNaN for those types on that
architecture.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Glibc-bugs mailing list