summaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/ldbl-128/e_j0l.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2016-05-26 20:55:03 +0000
committerJoseph Myers <joseph@codesourcery.com>2016-05-26 20:55:03 +0000
commitd73e7bdb3a9284eb437b6cd84923658e25f922f2 (patch)
treeb20ec5c3fed4bd7d27fc4412044b6980241fceaf /sysdeps/ieee754/ldbl-128/e_j0l.c
parent960be82cc2b256eded9242bd428ddd2dc4f89275 (diff)
downloadglibc-d73e7bdb3a9284eb437b6cd84923658e25f922f2.tar.gz
Fix ldbl-128 j0l, j1l, y0l, y1l for sNaN argument (bug 20151).
The ldbl-128 implementations of j0l, j1l, y0l, y1l (also used for ldbl-128ibm) return an sNaN argument unchanged. This patch fixes them to add a NaN argument to itself to quiet it before return. Tested for mips64. [BZ #20151] * sysdeps/ieee754/ldbl-128/e_j0l.c (__ieee754_j0l): Add NaN argument to itself before returning result. (__ieee754_y0l): Likewise. * sysdeps/ieee754/ldbl-128/e_j1l.c (__ieee754_j1l): Likewise. (__ieee754_y1l).
Diffstat (limited to 'sysdeps/ieee754/ldbl-128/e_j0l.c')
-rw-r--r--sysdeps/ieee754/ldbl-128/e_j0l.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/ieee754/ldbl-128/e_j0l.c b/sysdeps/ieee754/ldbl-128/e_j0l.c
index c208916a79..ddc82143dc 100644
--- a/sysdeps/ieee754/ldbl-128/e_j0l.c
+++ b/sysdeps/ieee754/ldbl-128/e_j0l.c
@@ -683,7 +683,7 @@ __ieee754_j0l (long double x)
if (! isfinite (x))
{
if (x != x)
- return x;
+ return x + x;
else
return 0.0L;
}
@@ -831,7 +831,7 @@ long double
if (! isfinite (x))
{
if (x != x)
- return x;
+ return x + x;
else
return 0.0L;
}