diff options
Diffstat (limited to 'src/complex/casin.c')
-rw-r--r-- | src/complex/casin.c | 3 |
1 files changed, 2 insertions, 1 deletions
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)); } |