summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--math/auto-libm-test-in1
-rw-r--r--math/auto-libm-test-out25
-rw-r--r--sysdeps/ieee754/ldbl-128/e_expl.c2
-rw-r--r--sysdeps/s390/fpu/libm-test-ulps3
5 files changed, 39 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index ad91d4f953..5e820f7e99 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2014-02-11  Stefan Liebler  <stli@linux.vnet.ibm.com>
+
+	[BZ #16447]
+	* math/auto-libm-test-in: Add testcase for expl.
+	* math/auto-libm-test-out: Regenerate.
+	* sysdeps/ieee754/ldbl-128/e_expl.c (__ieee754_expl): Fix
+	calculation of unsafe.
+	* sysdeps/s390/fpu/libm-test-ulps: Adjust ULPs for added testcase.
+
 2014-02-11  Marcus Shawcroft  <marcus.shawcroft@arm.com>
 
 	* sysdeps/aarch64: Move directory from ports/sysdeps/aarch64.
diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in
index b919dbcc12..c620361613 100644
--- a/math/auto-libm-test-in
+++ b/math/auto-libm-test-in
@@ -725,6 +725,7 @@ exp max xfail-rounding:dbl-64 xfail-rounding:ldbl-128ibm
 exp -7.4444006192138124e+02
 exp -0x1.75f113c30b1c8p+9
 exp -max
+exp -11342.8125
 
 exp10 0
 exp10 -0
diff --git a/math/auto-libm-test-out b/math/auto-libm-test-out
index 8955e18853..93818e8d49 100644
--- a/math/auto-libm-test-out
+++ b/math/auto-libm-test-out
@@ -62149,6 +62149,31 @@ exp -max
 = exp tonearest ldbl-128ibm -0xf.ffffffffffffbffffffffffffcp+1020L : 0x0p+0L : inexact-ok underflow errno-erange
 = exp towardzero ldbl-128ibm -0xf.ffffffffffffbffffffffffffcp+1020L : 0x0p+0L : inexact-ok underflow errno-erange
 = exp upward ldbl-128ibm -0xf.ffffffffffffbffffffffffffcp+1020L : 0x4p-1076L : inexact-ok underflow errno-erange-ok
+exp -11342.8125
+= exp downward flt-32 -0x2.c4edp+12f : 0x0p+0f : inexact-ok underflow errno-erange
+= exp tonearest flt-32 -0x2.c4edp+12f : 0x0p+0f : inexact-ok underflow errno-erange
+= exp towardzero flt-32 -0x2.c4edp+12f : 0x0p+0f : inexact-ok underflow errno-erange
+= exp upward flt-32 -0x2.c4edp+12f : 0x8p-152f : inexact-ok underflow errno-erange-ok
+= exp downward dbl-64 -0x2.c4edp+12 : 0x0p+0 : inexact-ok underflow errno-erange
+= exp tonearest dbl-64 -0x2.c4edp+12 : 0x0p+0 : inexact-ok underflow errno-erange
+= exp towardzero dbl-64 -0x2.c4edp+12 : 0x0p+0 : inexact-ok underflow errno-erange
+= exp upward dbl-64 -0x2.c4edp+12 : 0x4p-1076 : inexact-ok underflow errno-erange-ok
+= exp downward ldbl-96-intel -0x2.c4edp+12L : 0xd.be48e2532594eccp-16368L : inexact-ok
+= exp tonearest ldbl-96-intel -0x2.c4edp+12L : 0xd.be48e2532594eccp-16368L : inexact-ok
+= exp towardzero ldbl-96-intel -0x2.c4edp+12L : 0xd.be48e2532594eccp-16368L : inexact-ok
+= exp upward ldbl-96-intel -0x2.c4edp+12L : 0xd.be48e2532594ecdp-16368L : inexact-ok
+= exp downward ldbl-96-m68k -0x2.c4edp+12L : 0xd.be48e2532594eccp-16368L : inexact-ok
+= exp tonearest ldbl-96-m68k -0x2.c4edp+12L : 0xd.be48e2532594eccp-16368L : inexact-ok
+= exp towardzero ldbl-96-m68k -0x2.c4edp+12L : 0xd.be48e2532594eccp-16368L : inexact-ok
+= exp upward ldbl-96-m68k -0x2.c4edp+12L : 0xd.be48e2532594ecdp-16368L : inexact-ok
+= exp downward ldbl-128 -0x2.c4edp+12L : 0xd.be48e2532594ecc1a3b8f7ce2038p-16368L : inexact-ok
+= exp tonearest ldbl-128 -0x2.c4edp+12L : 0xd.be48e2532594ecc1a3b8f7ce2038p-16368L : inexact-ok
+= exp towardzero ldbl-128 -0x2.c4edp+12L : 0xd.be48e2532594ecc1a3b8f7ce2038p-16368L : inexact-ok
+= exp upward ldbl-128 -0x2.c4edp+12L : 0xd.be48e2532594ecc1a3b8f7ce204p-16368L : inexact-ok
+= exp downward ldbl-128ibm -0x2.c4edp+12L : 0x0p+0L : inexact-ok underflow errno-erange
+= exp tonearest ldbl-128ibm -0x2.c4edp+12L : 0x0p+0L : inexact-ok underflow errno-erange
+= exp towardzero ldbl-128ibm -0x2.c4edp+12L : 0x0p+0L : inexact-ok underflow errno-erange
+= exp upward ldbl-128ibm -0x2.c4edp+12L : 0x4p-1076L : inexact-ok underflow errno-erange-ok
 exp10 0
 = exp10 downward flt-32 0x0p+0f : 0x1p+0f : inexact-ok
 = exp10 tonearest flt-32 0x0p+0f : 0x1p+0f : inexact-ok
diff --git a/sysdeps/ieee754/ldbl-128/e_expl.c b/sysdeps/ieee754/ldbl-128/e_expl.c
index 8259758cff..ae2604eaed 100644
--- a/sysdeps/ieee754/ldbl-128/e_expl.c
+++ b/sysdeps/ieee754/ldbl-128/e_expl.c
@@ -181,7 +181,7 @@ __ieee754_expl (long double x)
 		* __expl_table[T_EXPL_RES2 + tval2];
       n_i = (int)n;
       /* 'unsafe' is 1 iff n_1 != 0.  */
-      unsafe = abs(n_i) >= -LDBL_MIN_EXP - 1;
+      unsafe = abs(n_i) >= 15000;
       ex2_u.ieee.exponent += n_i >> unsafe;
 
       /* Compute scale = 2^n_1.  */
diff --git a/sysdeps/s390/fpu/libm-test-ulps b/sysdeps/s390/fpu/libm-test-ulps
index 786720dbe1..bd423f031c 100644
--- a/sysdeps/s390/fpu/libm-test-ulps
+++ b/sysdeps/s390/fpu/libm-test-ulps
@@ -13374,6 +13374,9 @@ double: 1
 idouble: 1
 
 # exp_upward
+Test "exp_upward (-0x2.c4edp+12)":
+double: 1
+idouble: 1
 Test "exp_upward (-0x2.e870a4p+8)":
 double: 1
 idouble: 1