]> sourceware.org Git - glibc.git/commitdiff
Avoid ordered comparisons of NaNs in ldbl-128ibm acosl and asinl.
authorJoseph Myers <joseph@codesourcery.com>
Thu, 10 Oct 2013 19:11:30 +0000 (19:11 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Thu, 10 Oct 2013 19:11:30 +0000 (19:11 +0000)
ChangeLog
sysdeps/ieee754/ldbl-128ibm/e_acosl.c
sysdeps/ieee754/ldbl-128ibm/e_asinl.c

index 66780cbaa404ebd9051857da02616413224036b6..d7d764f8868c24930dcd5b6decc61c5e94b90d8b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2013-10-10  Joseph Myers  <joseph@codsourcery.com>
+
+       * sysdeps/ieee754/ldbl-128ibm/e_acosl.c (__ieee754_acosl): Check
+       for NaNs before doing comparisons on argument.
+       * sysdeps/ieee754/ldbl-128ibm/e_asinl.c (__ieee754_asinl):
+       Likewise.
+
 2013-10-10  Will Newton  <will.newton@linaro.org>
 
        * malloc/hooks.c (memalign_check): Ensure the value of bytes
index 86639930c96b0f59a7444264e4b141df96d956ad..2cb288238b1e6a5d68c935fedb2c756a19cebc34 100644 (file)
@@ -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)
     {
index 99a5b85fa024185afca69a544fa8bf3a6291e510..dece11875b3f6deca2b4586ae4827a1f44bcb4c0 100644 (file)
@@ -134,6 +134,8 @@ __ieee754_asinl (long double x)
   long double a, t, w, p, q, c, r, s;
   int flag;
 
+  if (__glibc_unlikely (__isnanl (x)))
+    return x + x;
   flag = 0;
   a = __builtin_fabsl (x);
   if (a == 1.0L)       /* |x|>= 1 */
This page took 0.11606 seconds and 5 git commands to generate.