aboutsummaryrefslogtreecommitdiff
path: root/math/s_catanf.c
diff options
context:
space:
mode:
Diffstat (limited to 'math/s_catanf.c')
-rw-r--r--math/s_catanf.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/math/s_catanf.c b/math/s_catanf.c
index 41e419d..b478684 100644
--- a/math/s_catanf.c
+++ b/math/s_catanf.c
@@ -90,7 +90,11 @@ __catanf (__complex__ float x)
}
if (absy < FLT_EPSILON / 2.0f)
- den = (1.0f - absx) * (1.0f + absx);
+ {
+ den = (1.0f - absx) * (1.0f + absx);
+ if (den == -0.0f)
+ den = 0.0f;
+ }
else if (absx >= 1.0f)
den = (1.0f - absx) * (1.0f + absx) - absy * absy;
else if (absx >= 0.75f || absy >= 0.5f)