diff options
author | Joseph Myers <joseph@codesourcery.com> | 2013-10-10 19:11:30 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2013-10-10 19:11:30 +0000 |
commit | 6f10289efb65e97917ebe42686f492a0037ec129 (patch) | |
tree | 247f562abff14c8c7b1af9024e8041e204785b96 | |
parent | 321e26847188300173a5dc0ca42c2ff7b9bf7a78 (diff) | |
download | glibc-6f10289efb65e97917ebe42686f492a0037ec129.zip glibc-6f10289efb65e97917ebe42686f492a0037ec129.tar.gz glibc-6f10289efb65e97917ebe42686f492a0037ec129.tar.bz2 |
Avoid ordered comparisons of NaNs in ldbl-128ibm acosl and asinl.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | sysdeps/ieee754/ldbl-128ibm/e_acosl.c | 2 | ||||
-rw-r--r-- | sysdeps/ieee754/ldbl-128ibm/e_asinl.c | 2 |
3 files changed, 11 insertions, 0 deletions
@@ -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 diff --git a/sysdeps/ieee754/ldbl-128ibm/e_acosl.c b/sysdeps/ieee754/ldbl-128ibm/e_acosl.c index 8663993..2cb2882 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) { diff --git a/sysdeps/ieee754/ldbl-128ibm/e_asinl.c b/sysdeps/ieee754/ldbl-128ibm/e_asinl.c index 99a5b85..dece118 100644 --- a/sysdeps/ieee754/ldbl-128ibm/e_asinl.c +++ b/sysdeps/ieee754/ldbl-128ibm/e_asinl.c @@ -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 */ |