/cln-1.3.2/src/float/transcendental/cl_F_tanh.cc
# · C++ · 22 lines · 9 code · 7 blank · 6 comment · 0 complexity · f735232c1043c717b9a53d1b3f3d7fb1 MD5 · raw file
- // tanh().
- // General includes.
- #include "base/cl_sysdep.h"
- // Specification.
- #include "cln/float.h"
- // Implementation.
- namespace cln {
- CL_INLINE const cl_F CL_INLINE_DECL(tanh) (const cl_F& x)
- {
- // Methode:
- // (/ (sinh x) (cosh x))
- var cosh_sinh_t hyp = cosh_sinh(x);
- return The(cl_F)(hyp.sinh) / The(cl_F)(hyp.cosh);
- }
- } // namespace cln