TANH(X)

Purpose

Hyperbolic tangent function.

Class

Elemental function

Argument type and attributes

X
must be of type real Fortran 2008 beginsor type complex.Fortran 2008 ends

Result type and attributes

Same as X.

Result value

The result value approximates tanh(X).

Fortran 2008 beginsIf X is of type complex, its imaginary part is considered a value in radians.Fortran 2008 ends

Examples

TANH(1.0) has the value 0.76159416, approximately.

Fortran 2008 beginsTANH((1.000000, 0.000000)) has the value (0.761594, 0.000000), approximately.Fortran 2008 ends

Specific Name Argument Type Result Type Pass As Arg?
TANH default real default real yes
DTANH double precision real double precision real yes
QTANH REAL(16) REAL(16) yes  1 
Note:
  •  1  IBM extension: the ability to pass the name as an argument.