aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2015-08-10 15:25:10 +0000
committerJoseph Myers <joseph@codesourcery.com>2015-08-10 15:25:10 +0000
commitd0649b2d8efca33363e399f1ba07d77e85901cfc (patch)
tree7b9e371adc311e50e9dd8083f9b602c44310df0b /sysdeps
parentd2ff039fa1636e42fad4a4074f9889ad47abc426 (diff)
downloadglibc-d0649b2d8efca33363e399f1ba07d77e85901cfc.tar
glibc-d0649b2d8efca33363e399f1ba07d77e85901cfc.tar.gz
glibc-d0649b2d8efca33363e399f1ba07d77e85901cfc.tar.bz2
glibc-d0649b2d8efca33363e399f1ba07d77e85901cfc.zip
Fix ldbl-128ibm sinhl inaccuracy near 0 (bug 18789).
ldbl-128ibm sinhl uses a too-big threshold to decide when to return the argument, resulting in large errors. This patch fixes it to use a more appropriate threshold. Tested for x86_64, x86 and powerpc. [BZ #18789] * sysdeps/ieee754/ldbl-128ibm/e_sinhl.c (__ieee754_sinhl): Use smaller threshold for returning the argument. * math/auto-libm-test-in: Add more tests of sinh. * math/auto-libm-test-out: Regenerated. * sysdeps/i386/fpu/libm-test-ulps: Update.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/i386/fpu/libm-test-ulps2
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/e_sinhl.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/sysdeps/i386/fpu/libm-test-ulps b/sysdeps/i386/fpu/libm-test-ulps
index a11dd38f9f..eddb3dc990 100644
--- a/sysdeps/i386/fpu/libm-test-ulps
+++ b/sysdeps/i386/fpu/libm-test-ulps
@@ -1872,6 +1872,8 @@ ildouble: 4
ldouble: 5
Function: "sinh_towardzero":
+idouble: 1
+ifloat: 1
ildouble: 3
ldouble: 4
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_sinhl.c b/sysdeps/ieee754/ldbl-128ibm/e_sinhl.c
index 08e5d86b41..00115df944 100644
--- a/sysdeps/ieee754/ldbl-128ibm/e_sinhl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/e_sinhl.c
@@ -53,7 +53,7 @@ __ieee754_sinhl(long double x)
if (jx<0) h = -h;
/* |x| in [0,40], return sign(x)*0.5*(E+E/(E+1))) */
if (ix < 0x4044000000000000LL) { /* |x|<40 */
- if (ix<0x3e20000000000000LL) { /* |x|<2**-29 */
+ if (ix<0x3c90000000000000LL) { /* |x|<2**-54 */
if (fabsl (x) < LDBL_MIN)
{
long double force_underflow = x * x;