X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fcomplex%2Fcatan.c;h=7dc2afeb50330a3293e1b349499df1eb875a5a59;hb=10e4bd3780050e75b72aac5d85c31816419bb17d;hp=39ce6cf2ff6fc3b8787522485ec420dfa5eac054;hpb=ae2a01da2e388535da243b3d974aef74a3c06ae0;p=musl diff --git a/src/complex/catan.c b/src/complex/catan.c index 39ce6cf2..7dc2afeb 100644 --- a/src/complex/catan.c +++ b/src/complex/catan.c @@ -91,29 +91,17 @@ double complex catan(double complex z) x = creal(z); y = cimag(z); - if (x == 0.0 && y > 1.0) - goto ovrf; - x2 = x * x; a = 1.0 - x2 - (y * y); - if (a == 0.0) - goto ovrf; t = 0.5 * atan2(2.0 * x, a); w = _redupi(t); t = y - 1.0; a = x2 + (t * t); - if (a == 0.0) - goto ovrf; t = y + 1.0; a = (x2 + t * t)/a; - w = w + (0.25 * log(a)) * I; - return w; - -ovrf: - // FIXME - w = MAXNUM + MAXNUM * I; + w = CMPLX(w, 0.25 * log(a)); return w; }