This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug math/20940] New: hypot sNaN handling


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]