tanh(3f) - [FORTRAN:INTRINSIC:MATHEMATICS:TRIGONOMETRIC] Hyperbolic tangent function
x = tanh(x)
tanh(X) computes the hyperbolic tangent of X.
X The type shall be REAL or COMPLEX.
The return value has same type and kind as X. If X is complex, the imaginary part of the result is in radians. If X is REAL, the return value lies in the range
-1 <= tanh(x) <= 1.
Sample program:
program demo_tanh use, intrinsic :: iso_fortran_env, only : real_kinds, real32, real64, real128 implicit none real(kind=real64) :: x = 2.1_real64 x = tanh(x) end program demo_tanh
[[FORTRAN 77]] and later, for a complex argument [[Fortran 2008]] or later
[[Elemental procedure|Elemental function]]
atanh(3)
tanh (3) | March 11, 2021 |