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