From 440169d681cc9f422e8486f1324079bef0e0c35a Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 25 Feb 2015 00:01:15 +0000 Subject: Fix ldbl-128ibm acoshl inaccuracy (bug 18019). The ldbl-128ibm implementation of acoshl uses a cut-off of 0x1p28 to determine when to use log(x) + log(2) as a formula. That cut-off is too small for this format, resulting in large errors. This patch changes it to a more appropriate cut-off of 0x1p56, adding tests around the cut-offs for various floating-point formats. Tested for powerpc. Also tested for x86_64 and x86 and updated ulps. [BZ #18019] * sysdeps/ieee754/ldbl-128ibm/e_acoshl.c (__ieee754_acoshl): Use 2**56 not 2**28 as threshold for log (2x) formula. * math/auto-libm-test-in: Add more tests of acosh. * math/auto-libm-test-out: Regenerated. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise. --- sysdeps/x86_64/fpu/libm-test-ulps | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'sysdeps/x86_64/fpu/libm-test-ulps') diff --git a/sysdeps/x86_64/fpu/libm-test-ulps b/sysdeps/x86_64/fpu/libm-test-ulps index 36e1b76811..cd9e44f4a4 100644 --- a/sysdeps/x86_64/fpu/libm-test-ulps +++ b/sysdeps/x86_64/fpu/libm-test-ulps @@ -29,20 +29,33 @@ ldouble: 1 Function: "acosh": double: 1 +float: 1 idouble: 1 +ifloat: 1 +ildouble: 1 +ldouble: 1 Function: "acosh_downward": +double: 1 float: 1 -ildouble: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 ldouble: 2 Function: "acosh_towardzero": +double: 1 float: 1 -ildouble: 1 +idouble: 1 +ifloat: 1 +ildouble: 2 ldouble: 2 Function: "acosh_upward": double: 1 +float: 1 +idouble: 1 +ifloat: 1 ildouble: 1 ldouble: 1 -- cgit 1.4.1