| Index: fusl/src/complex/catanf.c
|
| diff --git a/fusl/src/complex/catanf.c b/fusl/src/complex/catanf.c
|
| index 8533bde397fba574164335268dd839a650ef4756..7e6773ace1878451e974695f7516760ed4693b38 100644
|
| --- a/fusl/src/complex/catanf.c
|
| +++ b/fusl/src/complex/catanf.c
|
| @@ -61,55 +61,53 @@ static const double DP1 = 3.140625;
|
| static const double DP2 = 9.67502593994140625E-4;
|
| static const double DP3 = 1.509957990978376432E-7;
|
|
|
| -static float _redupif(float xx)
|
| -{
|
| - float x, t;
|
| - long i;
|
| +static float _redupif(float xx) {
|
| + float x, t;
|
| + long i;
|
|
|
| - x = xx;
|
| - t = x/(float)M_PI;
|
| - if (t >= 0.0f)
|
| - t += 0.5f;
|
| - else
|
| - t -= 0.5f;
|
| + x = xx;
|
| + t = x / (float)M_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;
|
| + 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;
|
| - float a, t, x, x2, y;
|
| +float complex catanf(float complex z) {
|
| + float complex w;
|
| + float a, t, x, x2, y;
|
|
|
| - x = crealf(z);
|
| - y = cimagf(z);
|
| + x = crealf(z);
|
| + y = cimagf(z);
|
|
|
| - if ((x == 0.0f) && (y > 1.0f))
|
| - goto ovrf;
|
| + if ((x == 0.0f) && (y > 1.0f))
|
| + goto ovrf;
|
|
|
| - x2 = x * x;
|
| - a = 1.0f - x2 - (y * y);
|
| - if (a == 0.0f)
|
| - goto ovrf;
|
| + x2 = x * x;
|
| + a = 1.0f - x2 - (y * y);
|
| + if (a == 0.0f)
|
| + goto ovrf;
|
|
|
| - t = 0.5f * atan2f(2.0f * x, a);
|
| - w = _redupif(t);
|
| + t = 0.5f * atan2f(2.0f * x, a);
|
| + w = _redupif(t);
|
|
|
| - t = y - 1.0f;
|
| - a = x2 + (t * t);
|
| - if (a == 0.0f)
|
| - goto ovrf;
|
| + t = y - 1.0f;
|
| + a = x2 + (t * t);
|
| + if (a == 0.0f)
|
| + goto ovrf;
|
|
|
| - t = y + 1.0f;
|
| - a = (x2 + (t * t))/a;
|
| - w = w + (0.25f * logf (a)) * I;
|
| - return w;
|
| + t = y + 1.0f;
|
| + a = (x2 + (t * t)) / a;
|
| + w = w + (0.25f * logf(a)) * I;
|
| + return w;
|
|
|
| ovrf:
|
| - // FIXME
|
| - w = MAXNUMF + MAXNUMF * I;
|
| - return w;
|
| + // FIXME
|
| + w = MAXNUMF + MAXNUMF * I;
|
| + return w;
|
| }
|
|
|