about summary refs log tree commit diff
path: root/sysdeps/ieee754/ldbl-128/e_j1l.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-11-18 12:33:53 -0800
committerDavid S. Miller <davem@davemloft.net>2012-11-18 12:33:53 -0800
commit05b227bdaea9a5f1faf08dad31221d8736f3659d (patch)
tree06e947ef8dbcee671b979246fa994fba53081e4c /sysdeps/ieee754/ldbl-128/e_j1l.c
parent786b0b67a3019e84988a6d5a79fd97801580a1cd (diff)
downloadglibc-05b227bdaea9a5f1faf08dad31221d8736f3659d.tar.gz
glibc-05b227bdaea9a5f1faf08dad31221d8736f3659d.tar.xz
glibc-05b227bdaea9a5f1faf08dad31221d8736f3659d.zip
Correct tinyness handling in long-double and float y0/y1.
	With help from Joseph Myers.
	* sysdeps/ieee754/flt-32/e_j0f.c (__ieee754_y0f): Adjust tinyness
	cutoff to 2**-13.
	* sysdeps/ieee754/flt-32/e_j1f.c (__ieee754_y1f): Adjust tinyness
	cutoff to 2**-25.
	* sysdeps/ieee754/ldbl-128/e_j0l.c (U0): New constant.
	( __ieee754_y0l): Avoid arithmetic underflow when 'x' is very
	small.
	* sysdeps/ieee754/ldbl-128/e_j1l.c (__ieee754_y1l): Likewise.
	* math/libm-test.inc (y0_test): New tests.
	(y1_test): New tests.
	* sysdeps/i386/fpu/libm-test-ulps: Update.
	* sysdeps/x86_64/fpu/libm-test-ulps: Update.
	* sysdeps/sparc/fpu/libm-test-ulps: Update.
Diffstat (limited to 'sysdeps/ieee754/ldbl-128/e_j1l.c')
-rw-r--r--sysdeps/ieee754/ldbl-128/e_j1l.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sysdeps/ieee754/ldbl-128/e_j1l.c b/sysdeps/ieee754/ldbl-128/e_j1l.c
index 1f62bd0920..f16343b26b 100644
--- a/sysdeps/ieee754/ldbl-128/e_j1l.c
+++ b/sysdeps/ieee754/ldbl-128/e_j1l.c
@@ -838,6 +838,8 @@ __ieee754_y1l (long double x)
       return -HUGE_VALL + x;
     }
   xx = fabsl (x);
+  if (xx <= 0x1p-114)
+    return -TWOOPI / x;
   if (xx <= 2.0L)
     {
       /* 0 <= x <= 2 */