fix build regression on armhf in tlsdesc asm
[musl.git] / src / complex / casinf.c
blob4fcb76fc57597b6b899cfa72c666b2aaa20b2765
1 #include "libm.h"
3 // FIXME
5 float complex casinf(float complex z)
7 float complex w;
8 float x, y;
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));