From 444ec6b8d8091456a2622765ac60f9c60e7755a9 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 3 Nov 2015 00:11:49 +0000 Subject: Fix dbl-64 remainder sign of zero result (bug 19201). For some large arguments, the dbl-64 implementation of remainder gives zero results with the wrong sign, resulting from a subtraction that is mathematically correct but does not guarantee that a zero result has the sign of the first argument to remainder. This patch adds an appropriate check for this case, similar to other implementations of remainder in the case of equality, and adds tests of remainder on inputs already used to test remquo. Tested for x86_64 and x86. [BZ #19201] * sysdeps/ieee754/dbl-64/e_remainder.c (__ieee754_remainder): Check for zero remainder in case of large exponents and ensure correct sign of result in that case. * math/libm-test.inc (remainder_test_data): Add more tests. --- NEWS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'NEWS') diff --git a/NEWS b/NEWS index 1cc08a0..896eb02 100644 --- a/NEWS +++ b/NEWS @@ -21,7 +21,8 @@ Version 2.23 18966, 18967, 18969, 18970, 18977, 18980, 18981, 18982, 18985, 19003, 19007, 19012, 19016, 19018, 19032, 19046, 19048, 19049, 19050, 19059, 19071, 19074, 19076, 19077, 19078, 19079, 19085, 19086, 19088, 19094, - 19095, 19124, 19125, 19129, 19134, 19137, 19156, 19174, 19181, 19189. + 19095, 19124, 19125, 19129, 19134, 19137, 19156, 19174, 19181, 19189, + 19201. * A defect in the malloc implementation, present since glibc 2.15 (2012) or glibc 2.10 via --enable-experimental-malloc (2009), could result in the -- cgit v1.1