move __memalign declaration to malloc_impl.h
[musl] / src / complex / casinf.c
index 93f0e33..4fcb76f 100644 (file)
@@ -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));
 }