glibc/sysdeps/ieee754/dbl-64/wordsize-64
Joseph Myers a820f9b3c0 Fix remquo spurious overflows (bug 17978).
Various remquo implementations, when computing the last three bits of
the quotient, have spurious overflows when 4 times the second argument
to remquo overflows.  These overflows can in turn cause bad results in
rounding modes where that overflow results in a finite value.  This
patch adds tests to avoid the problem multiplications in cases where
they would overflow, similar to those that control an earlier
multiplication by 8.

Tested for x86_64, x86, mips64 and powerpc.

	[BZ #17978]
	* sysdeps/ieee754/dbl-64/s_remquo.c (__remquo): Do not form
	products 4 * y and 2 * y where those would overflow.
	* sysdeps/ieee754/dbl-64/wordsize-64/s_remquo.c (__remquo):
	Likewise.
	* sysdeps/ieee754/flt-32/s_remquof.c (__remquof): Likewise.
	* sysdeps/ieee754/ldbl-128/s_remquol.c (__remquol): Likewise.
	* sysdeps/ieee754/ldbl-128ibm/s_remquol.c (__remquol): Likewise.
	* sysdeps/ieee754/ldbl-96/s_remquol.c (__remquol): Likewise.
	* math/libm-test.inc (remquo_test_data): Add more tests.
2015-02-16 22:38:28 +00:00
..
e_acosh.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
e_cosh.c Fix wordsize-64 cosh regression (bug 14273). 2012-06-21 19:26:09 +00:00
e_fmod.c Add #include <stdint.h> for uint[32|64]_t usage (except installed headers). 2013-05-16 11:32:54 -05:00
e_log2.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
e_log10.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
math_private.h Add #include <stdint.h> for uint[32|64]_t usage (except installed headers). 2013-05-16 11:32:54 -05:00
s_ceil.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
s_finite.c Add #include <stdint.h> for uint[32|64]_t usage (except installed headers). 2013-05-16 11:32:54 -05:00
s_floor.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_frexp.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_isinf_ns.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
s_isinf.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
s_isnan.c Add #include <stdint.h> for uint[32|64]_t usage (except installed headers). 2013-05-16 11:32:54 -05:00
s_issignaling.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_llround.c lround: provide cast for wordsize-64 version if needed 2015-01-05 11:59:32 -05:00
s_logb.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_lround.c Make lround the alias of llround for wordsize-64 2012-03-16 15:20:45 -07:00
s_modf.c Add #include <stdint.h> for uint[32|64]_t usage (except installed headers). 2013-05-16 11:32:54 -05:00
s_nearbyint.c Clean up dbl-64 rint, nearbyint. 2012-03-13 14:12:44 +00:00
s_remquo.c Fix remquo spurious overflows (bug 17978). 2015-02-16 22:38:28 +00:00
s_rint.c Clean up dbl-64 rint, nearbyint. 2012-03-13 14:12:44 +00:00
s_round.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
s_scalbln.c [BZ #6803] Set errno for scalbln, scalbn 2014-06-20 07:48:20 +05:30
s_scalbn.c Use <> for math.h and math_private.h everywhere. 2012-03-09 16:09:10 -08:00
s_trunc.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00