aboutsummaryrefslogtreecommitdiff
path: root/math/s_cacosh_template.c
diff options
context:
space:
mode:
Diffstat (limited to 'math/s_cacosh_template.c')
-rw-r--r--math/s_cacosh_template.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/math/s_cacosh_template.c b/math/s_cacosh_template.c
index 14f0b2a4e6..0014fd444c 100644
--- a/math/s_cacosh_template.c
+++ b/math/s_cacosh_template.c
@@ -57,7 +57,10 @@ M_DECL_FUNC (__cacosh) (CFLOAT x)
else
{
__real__ res = M_NAN;
- __imag__ res = M_NAN;
+ if (rcls == FP_ZERO)
+ __imag__ res = M_MLIT (M_PI_2);
+ else
+ __imag__ res = M_NAN;
}
}
else if (rcls == FP_ZERO && icls == FP_ZERO)