tanh

Date:

03-15-23

NAME

TANH, DTANH - Compute hyperbolic tangent

SYNOPSIS

TANH ([X=]x)
DTANH ([X=]x)

STANDARDS

Fortran

DESCRIPTION

The TANH and DTANH intrinsic functions compute the hyperbolic tangent of x. These functions evaluate y = tanh(x). They are elemental functions. They accept the following argument:

x

Must be of type real. The type and kind type of x is identical to the type and kind type of the return value. See the RETURN VALUES section for information on input data types and return values.

TANH is the generic function name; the others are specifics.

NOTES

The TANH and DTANH intrinsic function names can be passed as arguments; the other cannot.

The following return values occur:

  • If x > 19.1, TANH(x) yields 1.0.

  • If x < -19.1, TANH(x) yields -1.0.

  • TANH(NaN) and DTANH(NaN) both yield NaN.

Note: The tanh() function has a Linux-equivalent name. Use the man -aname option to show all manual pages matching name within the MANPATH search path. Manual pages are displayed in the order found.

RETURN VALUES

TANH returns the real hyperbolic tangent of its real argument.

DTANH returns the double-precision real hyperbolic tangent of its double-precision argument.