aboutsummaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
Diffstat (limited to 'math')
-rw-r--r--math/s_ccosh_template.c10
-rw-r--r--math/s_cexp_template.c5
-rw-r--r--math/s_csin_template.c11
-rw-r--r--math/s_csinh_template.c10
4 files changed, 7 insertions, 29 deletions
diff --git a/math/s_ccosh_template.c b/math/s_ccosh_template.c
index 7fea5c9..5240724 100644
--- a/math/s_ccosh_template.c
+++ b/math/s_ccosh_template.c
@@ -88,10 +88,7 @@ M_DECL_FUNC (__ccosh) (CFLOAT x)
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)
@@ -125,10 +122,7 @@ M_DECL_FUNC (__ccosh) (CFLOAT x)
else
{
__real__ retval = M_HUGE_VAL;
- __imag__ retval = M_NAN;
-
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
+ __imag__ retval = __imag__ x - __imag__ x;
}
}
else
diff --git a/math/s_cexp_template.c b/math/s_cexp_template.c
index a60afe0..dd46d96 100644
--- a/math/s_cexp_template.c
+++ b/math/s_cexp_template.c
@@ -121,10 +121,7 @@ M_DECL_FUNC (__cexp) (CFLOAT x)
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
{
diff --git a/math/s_csin_template.c b/math/s_csin_template.c
index 59d8876..2fe0b15 100644
--- a/math/s_csin_template.c
+++ b/math/s_csin_template.c
@@ -96,11 +96,8 @@ M_DECL_FUNC (__csin) (CFLOAT x)
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
{
@@ -145,12 +142,8 @@ M_DECL_FUNC (__csin) (CFLOAT x)
}
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
diff --git a/math/s_csinh_template.c b/math/s_csinh_template.c
index 45fbb36..e5fd4d5 100644
--- a/math/s_csinh_template.c
+++ b/math/s_csinh_template.c
@@ -97,10 +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;
-
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
+ __imag__ retval = __imag__ x - __imag__ x;
}
else
{
@@ -144,10 +141,7 @@ M_DECL_FUNC (__csinh) (CFLOAT x)
else
{
__real__ retval = M_HUGE_VAL;
- __imag__ retval = M_NAN;
-
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
+ __imag__ retval = __imag__ x - __imag__ x;
}
}
else