[PATCH] Fix generic expm1l for large parameters.

David Miller davem@davemloft.net
Tue Mar 13 05:02:00 GMT 2012


This simply mirrors the fix made to the i386 and x86_64 versions, and
this subsequently cures the last naggling glibc test case failures on
sparc32 and sparc64.

Any objections?

	* sysdeps/ieee754/ldbl-128/s_expm1l.c (__expm1l): Use expl for
	large parameters.

diff --git a/sysdeps/ieee754/ldbl-128/s_expm1l.c b/sysdeps/ieee754/ldbl-128/s_expm1l.c
index 17769dd..ea63501 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. */



More information about the Libc-alpha mailing list