From 9120a57f4819965fa976d5de3b1d27b284319ed1 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 19 Feb 2016 00:55:46 +0000 Subject: Fix ldbl-128ibm remainderl, remquol equality tests (bug 19603). The ldbl-128ibm implementations of remainderl and remquol have logic resulting in incorrect tests for equality of the absolute values of the arguments. Equality is tested based on the integer representations of the high and low parts, with the sign bit masked off the high part - but when this changes the sign of the high part, the sign of the low part needs to be changed as well, and failure to do this means arguments are wrongly treated as equal when they are not. This patch fixes the logic to adjust signs of low parts as needed. Tested for powerpc. [BZ #19603] * sysdeps/ieee754/ldbl-128ibm/e_remainderl.c (__ieee754_remainderl): Adjust sign of integer version of low part when taking absolute value of high part. * sysdeps/ieee754/ldbl-128ibm/s_remquol.c (__remquol): Likewise. * math/libm-test.inc (remainder_test_data): Add another test. (remquo_test_data): Likewise. --- ChangeLog | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 3e480edb1a..32fae2de24 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2016-02-19 Joseph Myers + + [BZ #19603] + * sysdeps/ieee754/ldbl-128ibm/e_remainderl.c + (__ieee754_remainderl): Adjust sign of integer version of low part + when taking absolute value of high part. + * sysdeps/ieee754/ldbl-128ibm/s_remquol.c (__remquol): Likewise. + * math/libm-test.inc (remainder_test_data): Add another test. + (remquo_test_data): Likewise. + 2016-02-18 Joseph Myers [BZ #19602] -- cgit v1.2.3