X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcomplex%2Fcasinl.c;h=072adc450d2b0ac6c224c734469b3b82f79d537a;hb=0ab97350f01b42de0f9fd811ee08653169661859;hp=0916c60f2a6b3c7eeb71d74c4cff06a5a1273fae;hpb=8bb181622222f2ee3462c8b021bcae4fcdbbd37a;p=musl diff --git a/src/complex/casinl.c b/src/complex/casinl.c index 0916c60f..072adc45 100644 --- a/src/complex/casinl.c +++ b/src/complex/casinl.c @@ -1,4 +1,4 @@ -#include "libm.h" +#include "complex_impl.h" #if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024 long double complex casinl(long double complex z) @@ -15,6 +15,7 @@ long double complex casinl(long double complex z) x = creall(z); y = cimagl(z); w = CMPLXL(1.0 - (x - y)*(x + y), -2.0*x*y); - return clogl(CMPLXL(-y, x) + csqrtl(w)); + long double complex r = clogl(CMPLXL(-y, x) + csqrtl(w)); + return CMPLXL(cimagl(r), -creall(r)); } #endif