blob: dfdda988bafcda9403b7e03ef55f4a0eaf9349a9 (
plain) (
tree)
|
|
#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);
return clog(CMPLX(-y, x) + csqrt(w));
}
|