Cloud

tanh

The tanh() function returns the hyperbolic tangent of a specified numeric argument.

Syntax

TANH(x)

Arguments

  • x: A number of type real or double precision, including zero.

Return type

Same as the input type (real or double precision).

Examples

Positive value

SELECT TANH(1);
        tanh
--------------------
 0.7615941559557649
(1 row)

Negative value

TANH(-x) returns the negative of TANH(x):

SELECT TANH(-1);
        tanh
---------------------
 -0.7615941559557649
(1 row)

Zero

SELECT TANH(0);
 tanh
------
    0
(1 row)