diff options
Diffstat (limited to 'src/complex/casinf.c')
-rw-r--r-- | src/complex/casinf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/complex/casinf.c b/src/complex/casinf.c index 93f0e335..4fcb76fc 100644 --- a/src/complex/casinf.c +++ b/src/complex/casinf.c @@ -10,5 +10,6 @@ float complex casinf(float complex z) x = crealf(z); y = cimagf(z); w = CMPLXF(1.0 - (x - y)*(x + y), -2.0*x*y); - return clogf(CMPLXF(-y, x) + csqrtf(w)); + float complex r = clogf(CMPLXF(-y, x) + csqrtf(w)); + return CMPLXF(cimagf(r), -crealf(r)); } |