TANH — Hyperbolic tangent function#
-
TANH(X)#
TANH(X)
computes the hyperbolic tangent ofX
.- Parameters:
X – The type shall be
REAL
orCOMPLEX
.- Returns:
The return value has same type and kind as
X
. IfX
is complex, the imaginary part of the result is in radians. IfX
isREAL
, the return value lies in the range - 1 leq tanh(x) leq 1 .
- Standard:
Fortran 77 and later, for a complex argument Fortran 2008 or later
- Class:
Elemental function
- Syntax:
X = TANH(X)
- Example:
program test_tanh real(8) :: x = 2.1_8 x = tanh(x) end program test_tanh
- Specific names:
Name
Argument
Return type
Standard
TANH(X)
REAL(4) X
REAL(4)
Fortran 77 and later
DTANH(X)
REAL(8) X
REAL(8)
Fortran 77 and later
- See also: