about summary refs log tree commit diff
path: root/sysdeps/ieee754/ldbl-128ibm
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2016-06-09 17:25:54 +0000
committerJoseph Myers <joseph@codesourcery.com>2016-06-09 17:25:54 +0000
commitb7519f61fe2c57981c69c0c65996968b9a4d9b62 (patch)
treeb3bdf9379b0d3d28321696ad13536115a877bc13 /sysdeps/ieee754/ldbl-128ibm
parentf8fc4b44942238dec3228c4e4d77553da2b3ec39 (diff)
downloadglibc-b7519f61fe2c57981c69c0c65996968b9a4d9b62.tar.gz
glibc-b7519f61fe2c57981c69c0c65996968b9a4d9b62.tar.xz
glibc-b7519f61fe2c57981c69c0c65996968b9a4d9b62.zip
Fix ldbl-128ibm log1pl (sNaN) (bug 20234).
The ldbl-128ibm version of log1pl 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 #20234]
	* sysdeps/ieee754/ldbl-128ibm/s_log1pl.c (__log1pl): Add positive
	infinity or NaN input to itself.
Diffstat (limited to 'sysdeps/ieee754/ldbl-128ibm')
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/s_log1pl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_log1pl.c b/sysdeps/ieee754/ldbl-128ibm/s_log1pl.c
index 743693bfd6..5457892a98 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_log1pl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_log1pl.c
@@ -132,7 +132,7 @@ __log1pl (long double xm1)
   xhi = ldbl_high (xm1);
   EXTRACT_WORDS (hx, lx, xhi);
   if (hx >= 0x7ff00000)
-    return xm1;
+    return xm1 + xm1;
 
   /* log1p(+- 0) = +- 0.  */
   if (((hx & 0x7fffffff) | lx) == 0)