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