about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-03-13 00:31:48 -0700
committerDavid S. Miller <davem@davemloft.net>2012-03-13 01:18:55 -0700
commit2a8ab7f26591053136bc17be34499db5c64e89d6 (patch)
treebfd5458c66c30eddb3b01f582d0e085b0650b908
parent10f62770e115d9f16a67a974f79fa9b100cf827b (diff)
downloadglibc-2a8ab7f26591053136bc17be34499db5c64e89d6.tar.gz
glibc-2a8ab7f26591053136bc17be34499db5c64e89d6.tar.xz
glibc-2a8ab7f26591053136bc17be34499db5c64e89d6.zip
Fix generic ldbl-128 expm1l just like x86-64 and i386 variants were.
	* sysdeps/ieee754/ldbl-128/s_expm1l.c (__expm1l): Use expl for
	large parameters.
-rw-r--r--ChangeLog3
-rw-r--r--sysdeps/ieee754/ldbl-128/s_expm1l.c5
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index b11f82d24f..57046513ed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2012-03-13  David S. Miller  <davem@davemloft.net>
 
+	* sysdeps/ieee754/ldbl-128/s_expm1l.c (__expm1l): Use expl for
+	large parameters.
+
 	* sysdeps/unix/sysv/linux/sparc/sparc64/dl-fxstatat64.c: New file.
 
 	* sysdeps/unix/sysv/linux/openat.c (OPENAT_NOT_CANCEL): Declare syscall
diff --git a/sysdeps/ieee754/ldbl-128/s_expm1l.c b/sysdeps/ieee754/ldbl-128/s_expm1l.c
index 17769dd6a3..ea63501819 100644
--- a/sysdeps/ieee754/ldbl-128/s_expm1l.c
+++ b/sysdeps/ieee754/ldbl-128/s_expm1l.c
@@ -102,6 +102,11 @@ __expm1l (long double x)
   ix = u.parts32.w0;
   sign = ix & 0x80000000;
   ix &= 0x7fffffff;
+  if (!sign && ix >= 0x40060000)
+    {
+      /* If num is positive and exp >= 6 use plain exp.  */
+      return __expl (x);
+    }
   if (ix >= 0x7fff0000)
     {
       /* Infinity. */