7 #include "cl_complex.h"
15 const cl_N sin (const cl_N& x)
19 // x = a+bi -> (complex (* (sin a) (cosh b)) (* (cos a) (sinh b)))
26 var const cl_R& a = realpart(x);
27 var const cl_R& b = imagpart(x);
28 var cl_cosh_sinh_t hyp_b = cl_cosh_sinh(b); // cosh(b), sinh(b) errechnen
29 var cl_cos_sin_t trig_a = cl_cos_sin(a); // cos(a), sin(a) errechnen
30 // Da b nicht = Fixnum 0 ist, ist auch sinh(b) nicht = Fixnum 0.
31 // cos(a) /= Fixnum 0.
32 return complex_C(trig_a.sin * hyp_b.cosh, // sin(a)*cosh(b)
33 trig_a.cos * hyp_b.sinh // cos(a)*sinh(b), nicht Fixnum 0