Joseph Myers
59a63cca11
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.
2015-10-02 17:11:13 +00:00
..
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2013-10-30 17:32:08 +10:00
2013-10-30 17:32:08 +10:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2012-12-04 20:22:08 +00:00
2006-01-14 12:10:44 +00:00
2013-09-04 15:25:42 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 20:33:13 +00:00
2008-03-05 07:05:13 +00:00
2006-01-14 22:08:18 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2015-09-08 21:11:03 +00:00
2015-01-02 16:29:47 +00:00
2006-01-14 12:10:44 +00:00
2015-04-22 12:07:56 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2008-03-05 07:05:13 +00:00
2006-01-18 23:30:58 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2015-06-03 16:35:44 +01:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 22:08:18 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2015-06-03 15:41:36 +01:00
2015-06-03 15:41:36 +01:00
2007-09-18 19:04:01 +00:00
2007-09-18 19:04:01 +00:00
2007-09-18 19:04:01 +00:00
2007-09-18 19:04:01 +00:00
2007-09-18 19:04:01 +00:00
2007-09-18 19:04:01 +00:00
2007-09-18 19:04:01 +00:00
2007-09-18 19:04:01 +00:00
2007-09-18 19:04:01 +00:00
2007-09-18 19:04:01 +00:00
2007-09-18 19:04:01 +00:00
2007-09-18 19:04:01 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2008-03-05 07:05:13 +00:00
2006-01-14 12:10:44 +00:00
2008-03-05 07:05:13 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 22:08:18 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 22:08:18 +00:00
2006-01-14 22:08:18 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2015-06-03 15:41:36 +01:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2012-01-07 23:57:22 -05:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2008-03-05 07:05:13 +00:00
2006-01-14 12:10:44 +00:00
2008-03-05 07:05:13 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 22:08:18 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2014-11-24 11:41:47 +05:30
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2014-11-24 11:41:47 +05:30
2006-01-14 12:10:44 +00:00
2010-10-13 22:27:03 -04:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2014-11-24 11:41:47 +05:30
2014-11-24 11:41:47 +05:30
2014-11-24 11:41:47 +05:30
2014-11-24 11:41:47 +05:30
2015-09-16 21:11:00 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2014-11-24 11:41:47 +05:30
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2015-10-02 17:11:13 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2014-11-24 11:41:47 +05:30
2014-11-24 11:41:47 +05:30
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2015-06-19 20:42:34 +03:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2008-03-05 07:05:13 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2012-04-17 22:12:53 +02:00
2012-04-17 22:12:53 +02:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00
2006-01-14 12:10:44 +00:00