+2016-10-13 Joseph Myers <joseph@codesourcery.com>
+
+ * math/s_ccosh_template.c (M_DECL_FUNC (__ccosh)): Instead of
+ raising FE_INVALID with feraisexcept in case where part of
+ argument is infinite, subtract that part of argument from itself.
+ * math/s_cexp_template.c (M_DECL_FUNC (__cexp)): Likewise.
+ * math/s_csin_template.c (M_DECL_FUNC (__csin)): Likewise.
+ * math/s_csinh_template.c (M_DECL_FUNC (__csinh)): Likewise.
+
2016-10-12 Joseph Myers <joseph@codesourcery.com>
* math/libm-test.inc (totalorder_test_data): Add more tests.
else
{
__imag__ retval = __real__ x == 0 ? 0 : M_NAN;
- __real__ retval = M_NAN;
-
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
+ __real__ retval = __imag__ x - __imag__ x;
}
}
else if (rcls == FP_INFINITE)
else
{
__real__ retval = M_HUGE_VAL;
- __imag__ retval = M_NAN;
-
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
+ __imag__ retval = __imag__ x - __imag__ x;
}
}
else
else if (signbit (__real__ x) == 0)
{
__real__ retval = M_HUGE_VAL;
- __imag__ retval = M_NAN;
-
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
+ __imag__ retval = __imag__ x - __imag__ x;
}
else
{
if (icls == FP_ZERO)
{
/* Imaginary part is 0.0. */
- __real__ retval = M_NAN;
+ __real__ retval = __real__ x - __real__ x;
__imag__ retval = __imag__ x;
-
- if (rcls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
}
else
{
}
else
{
- /* The addition raises the invalid exception. */
- __real__ retval = M_NAN;
+ __real__ retval = __real__ x - __real__ x;
__imag__ retval = M_HUGE_VAL;
-
- if (rcls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
}
}
else
{
/* Real part is 0.0. */
__real__ retval = M_COPYSIGN (0, negate ? -1 : 1);
- __imag__ retval = M_NAN;
-
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
+ __imag__ retval = __imag__ x - __imag__ x;
}
else
{
else
{
__real__ retval = M_HUGE_VAL;
- __imag__ retval = M_NAN;
-
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
+ __imag__ retval = __imag__ x - __imag__ x;
}
}
else