summaryrefslogtreecommitdiff
path: root/src/complex/catanf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/complex/catanf.c')
-rw-r--r--src/complex/catanf.c28
1 files changed, 1 insertions, 27 deletions
diff --git a/src/complex/catanf.c b/src/complex/catanf.c
index 1d569f2d..faaa907a 100644
--- a/src/complex/catanf.c
+++ b/src/complex/catanf.c
@@ -55,32 +55,6 @@
#include "complex_impl.h"
-#define MAXNUMF 1.0e38F
-
-static const double DP1 = 3.140625;
-static const double DP2 = 9.67502593994140625E-4;
-static const double DP3 = 1.509957990978376432E-7;
-
-static const float float_pi = M_PI;
-
-static float _redupif(float xx)
-{
- float x, t;
- long i;
-
- x = xx;
- t = x/float_pi;
- if (t >= 0.0f)
- t += 0.5f;
- else
- t -= 0.5f;
-
- i = t; /* the multiple */
- t = i;
- t = ((x - t * DP1) - t * DP2) - t * DP3;
- return t;
-}
-
float complex catanf(float complex z)
{
float complex w;
@@ -93,7 +67,7 @@ float complex catanf(float complex z)
a = 1.0f - x2 - (y * y);
t = 0.5f * atan2f(2.0f * x, a);
- w = _redupif(t);
+ w = t;
t = y - 1.0f;
a = x2 + (t * t);