public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/19059] New: nexttoward overflow incorrect in non-default rounding modes
@ 2015-10-02 16:43 jsm28 at gcc dot gnu.org
2015-10-02 17:12 ` [Bug math/19059] " cvs-commit at gcc dot gnu.org
2015-10-02 17:12 ` jsm28 at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2015-10-02 16:43 UTC (permalink / raw)
To: glibc-bugs
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug math/19059] nexttoward overflow incorrect in non-default rounding modes
2015-10-02 16:43 [Bug math/19059] New: nexttoward overflow incorrect in non-default rounding modes jsm28 at gcc dot gnu.org
2015-10-02 17:12 ` [Bug math/19059] " cvs-commit at gcc dot gnu.org
@ 2015-10-02 17:12 ` jsm28 at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2015-10-02 17:12 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=19059
Joseph Myers <jsm28 at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |2.23
--- Comment #2 from Joseph Myers <jsm28 at gcc dot gnu.org> ---
Fixed for 2.23.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug math/19059] nexttoward overflow incorrect in non-default rounding modes
2015-10-02 16:43 [Bug math/19059] New: nexttoward overflow incorrect in non-default rounding modes jsm28 at gcc dot gnu.org
@ 2015-10-02 17:12 ` cvs-commit at gcc dot gnu.org
2015-10-02 17:12 ` jsm28 at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2015-10-02 17:12 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=19059
--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 59a63cca1133a8e1e3219970ee95979ac1f810df (commit)
from ef6b619f73e49b6d87c7530e6e9f8a59723b492d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=59a63cca1133a8e1e3219970ee95979ac1f810df
commit 59a63cca1133a8e1e3219970ee95979ac1f810df
Author: Joseph Myers <joseph@codesourcery.com>
Date: Fri Oct 2 17:11:13 2015 +0000
Fix nexttoward overflow in non-default rounding modes (bug 19059).
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). This patch fixes the
problem by making the nexttoward implementations discard the result
from the floating-point computation that forced an overflow exception
and then return the infinity previously computed with integer
arithmetic.
Tested for x86_64, x86, mips64 and powerpc.
[BZ #19059]
* math/s_nexttowardf.c (__nexttowardf): Do not return value from
overflowing computation.
* sysdeps/i386/fpu/s_nexttoward.c (__nexttoward): Likewise.
* sysdeps/i386/fpu/s_nexttowardf.c (__nexttowardf): Likewise.
* sysdeps/ieee754/ldbl-128/s_nexttoward.c (__nexttoward):
Likewise.
* sysdeps/ieee754/ldbl-128/s_nexttowardf.c (__nexttowardf):
Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c (__nexttoward):
Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c (__nexttowardf):
Likewise.
* sysdeps/ieee754/ldbl-96/s_nexttoward.c (__nexttoward): Likewise.
* sysdeps/ieee754/ldbl-96/s_nexttowardf.c (__nexttowardf):
Likewise.
* sysdeps/ieee754/ldbl-opt/s_nexttowardfd.c (__nldbl_nexttowardf):
Likewise.
* math/libm-test.inc (nexttoward_test_data): Add more tests.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 20 ++++++++++++++++++++
NEWS | 2 +-
math/libm-test.inc | 4 ++++
math/s_nexttowardf.c | 4 ++--
sysdeps/i386/fpu/s_nexttoward.c | 4 ++--
sysdeps/i386/fpu/s_nexttowardf.c | 4 ++--
sysdeps/ieee754/ldbl-128/s_nexttoward.c | 4 ++--
sysdeps/ieee754/ldbl-128/s_nexttowardf.c | 5 ++++-
sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c | 4 ++--
sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c | 4 ++--
sysdeps/ieee754/ldbl-96/s_nexttoward.c | 4 ++--
sysdeps/ieee754/ldbl-96/s_nexttowardf.c | 4 ++--
sysdeps/ieee754/ldbl-opt/s_nexttowardfd.c | 4 ++--
13 files changed, 47 insertions(+), 20 deletions(-)
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-10-02 17:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-02 16:43 [Bug math/19059] New: nexttoward overflow incorrect in non-default rounding modes jsm28 at gcc dot gnu.org
2015-10-02 17:12 ` [Bug math/19059] " cvs-commit at gcc dot gnu.org
2015-10-02 17:12 ` jsm28 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).