aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--math/s_ccosh_template.c5
-rw-r--r--math/s_csinh_template.c5
3 files changed, 10 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 2590895..ee5f315 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-10-11 Joseph Myers <joseph@codesourcery.com>
+
+ * math/s_ccosh_template.c (M_DECL_FUNC (__ccosh)): Use M_NAN
+ instead of M_NAN + M_NAN.
+ * math/s_csinh_template.c (M_DECL_FUNC (__csinh)): Likewise.
+
2016-10-10 Samuel Thibault <samuel.thibault@ens-lyon.org>
* misc/getauxval.c [!HAVE_AUX_VECTOR] (__getauxval): Do not define
diff --git a/math/s_ccosh_template.c b/math/s_ccosh_template.c
index 68de41d..7fea5c9 100644
--- a/math/s_ccosh_template.c
+++ b/math/s_ccosh_template.c
@@ -88,7 +88,7 @@ M_DECL_FUNC (__ccosh) (CFLOAT x)
else
{
__imag__ retval = __real__ x == 0 ? 0 : M_NAN;
- __real__ retval = M_NAN + M_NAN;
+ __real__ retval = M_NAN;
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
@@ -124,9 +124,8 @@ M_DECL_FUNC (__ccosh) (CFLOAT x)
}
else
{
- /* The addition raises the invalid exception. */
__real__ retval = M_HUGE_VAL;
- __imag__ retval = M_NAN + M_NAN;
+ __imag__ retval = M_NAN;
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
diff --git a/math/s_csinh_template.c b/math/s_csinh_template.c
index 22c0c31..45fbb36 100644
--- a/math/s_csinh_template.c
+++ b/math/s_csinh_template.c
@@ -97,7 +97,7 @@ M_DECL_FUNC (__csinh) (CFLOAT x)
{
/* Real part is 0.0. */
__real__ retval = M_COPYSIGN (0, negate ? -1 : 1);
- __imag__ retval = M_NAN + M_NAN;
+ __imag__ retval = M_NAN;
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
@@ -143,9 +143,8 @@ M_DECL_FUNC (__csinh) (CFLOAT x)
}
else
{
- /* The addition raises the invalid exception. */
__real__ retval = M_HUGE_VAL;
- __imag__ retval = M_NAN + M_NAN;
+ __imag__ retval = M_NAN;
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);