mirror of https://git.musl-libc.org/git/musl
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
313 B
17 lines
313 B
#include "libm.h"
|
|
|
|
// FIXME
|
|
|
|
/* asin(z) = -i log(i z + sqrt(1 - z*z)) */
|
|
|
|
double complex casin(double complex z)
|
|
{
|
|
double complex w;
|
|
double x, y;
|
|
|
|
x = creal(z);
|
|
y = cimag(z);
|
|
w = CMPLX(1.0 - (x - y)*(x + y), -2.0*x*y);
|
|
double complex r = clog(CMPLX(-y, x) + csqrt(w));
|
|
return CMPLX(cimag(r), -creal(r));
|
|
}
|
|
|