aboutsummaryrefslogtreecommitdiff
path: root/math/s_catanhl.c
diff options
context:
space:
mode:
Diffstat (limited to 'math/s_catanhl.c')
-rw-r--r--math/s_catanhl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/math/s_catanhl.c b/math/s_catanhl.c
index 537bb3e28d..6410afec31 100644
--- a/math/s_catanhl.c
+++ b/math/s_catanhl.c
@@ -118,7 +118,11 @@ __catanhl (__complex__ long double x)
}
if (absy < LDBL_EPSILON / 2.0L)
- den = (1.0L - absx) * (1.0L + absx);
+ {
+ den = (1.0L - absx) * (1.0L + absx);
+ if (den == -0.0L)
+ den = 0.0L;
+ }
else if (absx >= 1.0L)
den = (1.0L - absx) * (1.0L + absx) - absy * absy;
else if (absx >= 0.75L || absy >= 0.5L)