-#include "libm.h"
+#include "complex_impl.h"
// FIXME
x = crealf(z);
y = cimagf(z);
- w = cpackf(1.0 - (x - y)*(x + y), -2.0*x*y);
- return clogf(cpackf(-y, x) + csqrtf(w));
+ w = CMPLXF(1.0 - (x - y)*(x + y), -2.0*x*y);
+ float complex r = clogf(CMPLXF(-y, x) + csqrtf(w));
+ return CMPLXF(cimagf(r), -crealf(r));
}