diff options
author | Joseph Myers <joseph@codesourcery.com> | 2016-06-09 17:24:52 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2016-06-09 17:24:52 +0000 |
commit | f8fc4b44942238dec3228c4e4d77553da2b3ec39 (patch) | |
tree | 3e10b7eec069e3f81851833941fd0a28a5a07755 /sysdeps/ieee754/ldbl-128ibm/s_expm1l.c | |
parent | 59e53a78985be92134f126c5597d15a9998001d1 (diff) | |
download | glibc-f8fc4b44942238dec3228c4e4d77553da2b3ec39.zip glibc-f8fc4b44942238dec3228c4e4d77553da2b3ec39.tar.gz glibc-f8fc4b44942238dec3228c4e4d77553da2b3ec39.tar.bz2 |
Fix ldbl-128ibm expm1l (sNaN) (bug 20233).
The ldbl-128ibm version of expm1l returns sNaN for sNaN input. This
patch fixes it to add such inputs to themselves so that qNaN is
returned in this case.
Tested for powerpc.
[BZ #20233]
* sysdeps/ieee754/ldbl-128ibm/s_expm1l.c (__expm1l): Add NaN input
to itself.
Diffstat (limited to 'sysdeps/ieee754/ldbl-128ibm/s_expm1l.c')
-rw-r--r-- | sysdeps/ieee754/ldbl-128ibm/s_expm1l.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_expm1l.c b/sysdeps/ieee754/ldbl-128ibm/s_expm1l.c index 66f75e1..42d57c6 100644 --- a/sysdeps/ieee754/ldbl-128ibm/s_expm1l.c +++ b/sysdeps/ieee754/ldbl-128ibm/s_expm1l.c @@ -106,8 +106,8 @@ __expm1l (long double x) /* Infinity (which must be negative infinity). */ if (((ix - 0x7ff00000) | lx) == 0) return -1.0L; - /* NaN. No invalid exception. */ - return x; + /* NaN. Invalid exception if signaling. */ + return x + x; } /* expm1(+- 0) = +- 0. */ |