X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fcomplex%2Fcatanl.c;h=e62526c00672b42b91592334b2f113326c40e9a7;hb=0c277ff156749628c678257f878d3a6edb5868de;hp=5ace7704fdc086461216389aa83b980c161e2c3f;hpb=b69f695acedd4ce2798ef9ea28d834ceccc789bd;p=musl diff --git a/src/complex/catanl.c b/src/complex/catanl.c index 5ace7704..e62526c0 100644 --- a/src/complex/catanl.c +++ b/src/complex/catanl.c @@ -59,7 +59,7 @@ #include #include -#include "libm.h" +#include "complex_impl.h" #if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024 long double complex catanl(long double complex z) @@ -97,30 +97,18 @@ long double complex catanl(long double complex z) x = creall(z); y = cimagl(z); - if ((x == 0.0L) && (y > 1.0L)) - goto ovrf; - x2 = x * x; a = 1.0L - x2 - (y * y); - if (a == 0.0L) - goto ovrf; t = atan2l(2.0L * x, a) * 0.5L; w = redupil(t); t = y - 1.0L; a = x2 + (t * t); - if (a == 0.0L) - goto ovrf; t = y + 1.0L; a = (x2 + (t * t)) / a; - w = w + (0.25L * logl(a)) * I; - return w; - -ovrf: - // FIXME - w = LDBL_MAX + LDBL_MAX * I; + w = CMPLXF(w, 0.25L * logl(a)); return w; } #endif