7 #include "cln/complex.h"
17 const cl_N sin (const cl_N& x)
21 // x = a+bi -> (complex (* (sin a) (cosh b)) (* (cos a) (sinh b)))
28 var const cl_R& a = realpart(x);
29 var const cl_R& b = imagpart(x);
30 var cosh_sinh_t hyp_b = cosh_sinh(b); // cosh(b), sinh(b) errechnen
31 var cos_sin_t trig_a = cos_sin(a); // cos(a), sin(a) errechnen
32 // Da b nicht = Fixnum 0 ist, ist auch sinh(b) nicht = Fixnum 0.
33 // cos(a) /= Fixnum 0.
34 return complex_C(trig_a.sin * hyp_b.cosh, // sin(a)*cosh(b)
35 trig_a.cos * hyp_b.sinh // cos(a)*sinh(b), nicht Fixnum 0