This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix generic expm1l for large parameters.


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. */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]