master
1#include "complex_impl.h"
2
3// FIXME
4
5float complex casinf(float complex z)
6{
7 float complex w;
8 float x, y;
9
10 x = crealf(z);
11 y = cimagf(z);
12 w = CMPLXF(1.0 - (x - y)*(x + y), -2.0*x*y);
13 float complex r = clogf(CMPLXF(-y, x) + csqrtf(w));
14 return CMPLXF(cimagf(r), -crealf(r));
15}