]> www.ginac.de Git - cln.git/blob - src/real/transcendental/cl_R_tanh.cc
Initial revision
[cln.git] / src / real / transcendental / cl_R_tanh.cc
1 // tanh().
2
3 // General includes.
4 #include "cl_sysdep.h"
5
6 // Specification.
7 #include "cl_real.h"
8
9
10 // Implementation.
11
12 MAYBE_INLINE
13 const cl_R tanh (const cl_R& x)
14 {
15 // Methode:
16 // (/ (sinh x) (cosh x))
17         var cl_cosh_sinh_t hyp = cl_cosh_sinh(x);
18         return hyp.sinh / hyp.cosh;
19 }