This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Fix generic expm1l for large parameters.
- From: David Miller <davem at davemloft dot net>
- To: libc-alpha at sourceware dot org
- Date: Mon, 12 Mar 2012 22:02:27 -0700 (PDT)
- Subject: [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. */