]> www.ginac.de Git - cln.git/blob - src/float/transcendental/cl_F_tanh.cc
* Add support for OpenBSD.
[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 "cln/float.h"
8
9
10 // Implementation.
11
12 namespace cln {
13
14 MAYBE_INLINE
15 const cl_F tanh (const cl_F& x)
16 {
17 // Methode:
18 // (/ (sinh x) (cosh x))
19         var cosh_sinh_t hyp = cosh_sinh(x);
20         return The(cl_F)(hyp.sinh) / The(cl_F)(hyp.cosh);
21 }
22
23 }  // namespace cln