From 9bb69b60fa6efdaebfa4d1a0291b555e71cd9caf Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 11 Sep 2015 15:34:25 +0000 Subject: Fix ldbl-128/ldbl-128ibm lgamma spurious "invalid", incorrect signgam (bug 18952). The ldbl-128 / ldbl-128ibm implementation of lgammal converts (the floor of minus) non-integer negative arguments to int to determine the value of signgam. When those values are outside the range of int, this produces spurious "invalid" exceptions and incorrect values of signgam. This patch fixes this by instead determining signgam through comparing half the integer in question to floor of half the integer. Tested for mips64, x86_64 and x86. [BZ #18952] * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (__ieee754_lgammal_r): Do not convert non-integer negative arguments to int to determine the value of signgam. * math/auto-libm-test-in: Add more tests of lgamma. * math/auto-libm-test-out: Regenerated. --- ChangeLog | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 61a4b539fe..9e23da11b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2015-09-11 Joseph Myers + [BZ #18952] + * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (__ieee754_lgammal_r): Do + not convert non-integer negative arguments to int to determine the + value of signgam. + * math/auto-libm-test-in: Add more tests of lgamma. + * math/auto-libm-test-out: Regenerated. + * math/auto-libm-test-in: Add more tests of acosh, atanh, cbrt, cosh, csqrt, erfc, expm1 and lgamma. * math/auto-libm-test-out: Regenerated. -- cgit 1.4.1