about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--sysdeps/ieee754/ldbl-128/e_j0l.c7
-rw-r--r--sysdeps/ieee754/ldbl-128/e_j1l.c7
3 files changed, 9 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index fac0e11c40..27f41f7ad0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2017-02-12  Gabriel F. T. Gomes  <gftg@linux.vnet.ibm.com>
+
+	[BZ #21130]
+	* sysdeps/ieee754/ldbl-128/e_j0l.c (__ieee754_y0l): Return NAN
+	with the "invalid" exception raised when x is -Inf.
+	* sysdeps/ieee754/ldbl-128/e_j1l.c (__ieee754_y1l): Likewise.
+
 2017-02-10  Wilco Dijkstra  <wdijkstr@arm.com>
 
 	* string/bits/string2.h (strchr): Remove define.
diff --git a/sysdeps/ieee754/ldbl-128/e_j0l.c b/sysdeps/ieee754/ldbl-128/e_j0l.c
index d711007136..855b5a578b 100644
--- a/sysdeps/ieee754/ldbl-128/e_j0l.c
+++ b/sysdeps/ieee754/ldbl-128/e_j0l.c
@@ -829,12 +829,7 @@ _Float128
   _Float128 xx, xinv, z, p, q, c, s, cc, ss;
 
   if (! isfinite (x))
-    {
-      if (x != x)
-	return x + x;
-      else
-	return 0;
-    }
+    return 1 / (x + x * x);
   if (x <= 0)
     {
       if (x < 0)
diff --git a/sysdeps/ieee754/ldbl-128/e_j1l.c b/sysdeps/ieee754/ldbl-128/e_j1l.c
index 9e782305d9..db8dca0ab1 100644
--- a/sysdeps/ieee754/ldbl-128/e_j1l.c
+++ b/sysdeps/ieee754/ldbl-128/e_j1l.c
@@ -847,12 +847,7 @@ __ieee754_y1l (_Float128 x)
   _Float128 xx, xinv, z, p, q, c, s, cc, ss;
 
   if (! isfinite (x))
-    {
-      if (x != x)
-	return x + x;
-      else
-	return 0;
-    }
+    return 1 / (x + x * x);
   if (x <= 0)
     {
       if (x < 0)