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/19059] New: nexttoward overflow incorrect in non-default rounding modes


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

            Bug ID: 19059
           Summary: nexttoward overflow incorrect in non-default rounding
                    modes
           Product: glibc
           Version: 2.22
            Status: NEW
          Severity: normal
          Priority: P2
         Component: math
          Assignee: unassigned at sourceware dot org
          Reporter: jsm28 at gcc dot gnu.org
  Target Milestone: ---

ISO C requires overflowing results from nexttoward to be the appropriate
infinity independent of the rounding mode, but some implementations use a
rounding-mode-dependent result (this is the same issue as was fixed for
nextafter in bug 16677).  E.g., for float on x86_64:

Failure: Test: nexttoward_downward (max_value, inf)
Result:
 is:          3.40282346e+38   0x1.fffffep+127
 should be:   inf   inf
Failure: Test: nexttoward_towardzero (max_value, inf)
Result:
 is:          3.40282346e+38   0x1.fffffep+127
 should be:   inf   inf
Failure: Test: nexttoward_towardzero (-max_value, -inf)
Result:
 is:         -3.40282346e+38  -0x1.fffffep+127
 should be:  -inf  -inf
Failure: Test: nexttoward_upward (-max_value, -inf)
Result:
 is:         -3.40282346e+38  -0x1.fffffep+127
 should be:  -inf  -inf

-- 
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]