+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-04 Anton Blanchard <anton@au1.ibm.com>
Alistair Popple <alistair@ozlabs.au.ibm.com>
Alan Modra <amodra@gmail.com>
long double
__ieee754_acosl (long double x)
{
- long double z, r, w, p, q, s, t, f2;
+ long double a, z, r, w, p, q, s, t, f2;
ieee854_long_double_shape_type u;
- u.value = __builtin_fabsl (x);
- if (u.value == 1.0L)
+ if (__glibc_unlikely (__isnanl (x)))
+ return x + x;
+ a = __builtin_fabsl (x);
+ if (a == 1.0L)
{
if (x > 0.0L)
return 0.0; /* acos(1) = 0 */
int flag;
ieee854_long_double_shape_type u;
+ if (__glibc_unlikely (__isnanl (x)))
+ return x + x;
flag = 0;
u.value = __builtin_fabsl (x);
if (u.value == 1.0L) /* |x|>= 1 */