about summary refs log tree commit diff
path: root/sysdeps/ieee754/ldbl-128ibm/e_acosl.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2013-10-10 19:11:30 +0000
committerJoseph Myers <joseph@codesourcery.com>2013-10-10 19:11:30 +0000
commit6f10289efb65e97917ebe42686f492a0037ec129 (patch)
tree247f562abff14c8c7b1af9024e8041e204785b96 /sysdeps/ieee754/ldbl-128ibm/e_acosl.c
parent321e26847188300173a5dc0ca42c2ff7b9bf7a78 (diff)
downloadglibc-6f10289efb65e97917ebe42686f492a0037ec129.tar.gz
glibc-6f10289efb65e97917ebe42686f492a0037ec129.tar.xz
glibc-6f10289efb65e97917ebe42686f492a0037ec129.zip
Avoid ordered comparisons of NaNs in ldbl-128ibm acosl and asinl.
Diffstat (limited to 'sysdeps/ieee754/ldbl-128ibm/e_acosl.c')
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/e_acosl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_acosl.c b/sysdeps/ieee754/ldbl-128ibm/e_acosl.c
index 86639930c9..2cb288238b 100644
--- a/sysdeps/ieee754/ldbl-128ibm/e_acosl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/e_acosl.c
@@ -153,6 +153,8 @@ __ieee754_acosl (long double x)
 {
   long double a, z, r, w, p, q, s, t, f2;
 
+  if (__glibc_unlikely (__isnanl (x)))
+    return x + x;
   a = __builtin_fabsl (x);
   if (a == 1.0L)
     {