PageRenderTime 38ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/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
Possible License(s): GPL-2.0
  1. // tanh().
  2. // General includes.
  3. #include "base/cl_sysdep.h"
  4. // Specification.
  5. #include "cln/float.h"
  6. // Implementation.
  7. namespace cln {
  8. CL_INLINE const cl_F CL_INLINE_DECL(tanh) (const cl_F& x)
  9. {
  10. // Methode:
  11. // (/ (sinh x) (cosh x))
  12. var cosh_sinh_t hyp = cosh_sinh(x);
  13. return The(cl_F)(hyp.sinh) / The(cl_F)(hyp.cosh);
  14. }
  15. } // namespace cln