X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fcomplex%2Fcasin.c;h=01ed61841ea4dc3447b76ec1b9470114a605fc62;hb=e97681d6f2c44bf5fa9ecdd30607cb63c780062e;hp=dfdda988bafcda9403b7e03ef55f4a0eaf9349a9;hpb=8bb181622222f2ee3462c8b021bcae4fcdbbd37a;p=musl diff --git a/src/complex/casin.c b/src/complex/casin.c index dfdda988..01ed6184 100644 --- a/src/complex/casin.c +++ b/src/complex/casin.c @@ -12,5 +12,6 @@ double complex casin(double complex z) x = creal(z); y = cimag(z); w = CMPLX(1.0 - (x - y)*(x + y), -2.0*x*y); - return clog(CMPLX(-y, x) + csqrt(w)); + double complex r = clog(CMPLX(-y, x) + csqrt(w)); + return CMPLX(cimag(r), -creal(r)); }