diff options
author | Joseph Myers <joseph@codesourcery.com> | 2015-09-16 16:42:46 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2015-09-16 16:42:46 +0000 |
commit | 8124ac3e7383a5938ca87c3cc554bf6646744d65 (patch) | |
tree | ce2bb02c5d6938fb82e1eba514ba950ad60fa53c /sysdeps/ieee754/ldbl-128ibm | |
parent | 560b04462f899e76a0062ec89422caa6e94fd67f (diff) | |
download | glibc-8124ac3e7383a5938ca87c3cc554bf6646744d65.zip glibc-8124ac3e7383a5938ca87c3cc554bf6646744d65.tar.gz glibc-8124ac3e7383a5938ca87c3cc554bf6646744d65.tar.bz2 |
Clean up ldbl-128 / ldbl-128ibm expm1l dead code (bug 16415).
The ldbl-128 and ldbl-128ibm expm1l implementations have code to
handle +Inf and finite arguments above an overflow threshold. Since
they now use __expl for large positive arguments to fix other
problems, this code is unreachable; this patch removes it.
Tested for mips64 and powerpc.
[BZ #16415]
* sysdeps/ieee754/ldbl-128/s_expm1l.c (maxlog): Remove variable.
(__expm1l): Remove code to handle positive infinity and overflow.
* sysdeps/ieee754/ldbl-128ibm/s_expm1l.c (maxlog): Remove
variable.
(__expm1l): Remove code to handle positive infinity and overflow.
Diffstat (limited to 'sysdeps/ieee754/ldbl-128ibm')
-rw-r--r-- | sysdeps/ieee754/ldbl-128ibm/s_expm1l.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_expm1l.c b/sysdeps/ieee754/ldbl-128ibm/s_expm1l.c index 0464f79..66f75e1 100644 --- a/sysdeps/ieee754/ldbl-128ibm/s_expm1l.c +++ b/sysdeps/ieee754/ldbl-128ibm/s_expm1l.c @@ -82,8 +82,6 @@ static const long double C1 = 6.93145751953125E-1L, C2 = 1.428606820309417232121458176568075500134E-6L, -/* ln (2^16384 * (1 - 2^-113)) */ - maxlog = 1.1356523406294143949491931077970764891253E4L, /* ln 2^-114 */ minarg = -7.9018778583833765273564461846232128760607E1L, big = 1e290L; @@ -105,14 +103,9 @@ __expm1l (long double x) return __expl (x); if (ix >= 0x7ff00000) { - /* Infinity. */ + /* Infinity (which must be negative infinity). */ if (((ix - 0x7ff00000) | lx) == 0) - { - if (sign) - return -1.0L; - else - return x; - } + return -1.0L; /* NaN. No invalid exception. */ return x; } @@ -121,13 +114,6 @@ __expm1l (long double x) if ((ix | lx) == 0) return x; - /* Overflow. */ - if (x > maxlog) - { - __set_errno (ERANGE); - return (big * big); - } - /* Minimum value. */ if (x < minarg) return (4.0/big - 1.0L); |