4 #include "base/cl_sysdep.h"
7 #include "cln/complex.h"
12 #include "complex/cl_C.h"
18 // Wert und Branch Cuts nach der Formel CLTL2, S. 311:
19 // arcsin(z) = log(iz+sqrt(1-z^2))/i
20 // Sei z=x+iy, errechne u+iv = arsinh(-y+ix) wie oben, Ergebnis v-iu.
21 // Real- und Imaginärteil des Ergebnisses sind Floats, außer wenn z reell oder
24 inline const cl_C_R _asin (const cl_N& z)
31 return asinh(-imagpart(z),realpart(z));
35 const cl_N asin (const cl_N& z)
37 var cl_C_R u_v = _asin(z);
38 var cl_R& u = u_v.realpart;
39 var cl_R& v = u_v.imagpart;
40 return complex(v,-u); // v-iu