public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/16677] New: nextafter incorrect in directed rounding modes
@ 2014-03-08  0:52 jsm28 at gcc dot gnu.org
  2014-03-08 14:09 ` [Bug math/16677] " cvs-commit at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2014-03-08  0:52 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 16677
           Summary: nextafter incorrect in directed rounding modes
           Product: glibc
           Version: 2.19
            Status: NEW
          Severity: normal
          Priority: P2
         Component: math
          Assignee: unassigned at sourceware dot org
          Reporter: jsm28 at gcc dot gnu.org

At least some nextafter implementations compute an overflowing result as x + x
to raise the overflow exception.  However, the result must be independent of
the rounding mode (C11 F.10.8.3); the exception is correct, the finite value in
some rounding modes isn't.  E.g., on x86_64 for float:

testing float (without inline functions)
Failure: Test: nextafter_downward (max_value, inf)
Result:
 is:          3.40282346638528859811e+38   0x1.fffffe00000000000000p+127
 should be:   inf   inf
Failure: Test: nextafter_towardzero (max_value, inf)
Result:
 is:          3.40282346638528859811e+38   0x1.fffffe00000000000000p+127
 should be:   inf   inf
Failure: Test: nextafter_towardzero (-max_value, -inf)
Result:
 is:         -3.40282346638528859811e+38  -0x1.fffffe00000000000000p+127
 should be:  -inf  -inf
Failure: Test: nextafter_upward (-max_value, -inf)
Result:
 is:         -3.40282346638528859811e+38  -0x1.fffffe00000000000000p+127
 should be:  -inf  -inf

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-10-02 17:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-08  0:52 [Bug math/16677] New: nextafter incorrect in directed rounding modes jsm28 at gcc dot gnu.org
2014-03-08 14:09 ` [Bug math/16677] " cvs-commit at gcc dot gnu.org
2014-03-11 22:25 ` jsm28 at gcc dot gnu.org
2014-03-11 22:25 ` cvs-commit at gcc dot gnu.org
2014-06-13  6:36 ` fweimer at redhat dot com
2015-10-02 17:12 ` cvs-commit at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).