PostgreSQL tanh() Function
The PostgreSQL tanh()
function returns the hyperbolic tangent of the specified number.
tanh()
Syntax
This is the syntax of the PostgreSQL tanh()
function:
tanh(number)
Parameters
number
-
Required. The number used to calculate the hyperbolic tangent.
Return value
The PostgreSQL tanh()
function returns the hyperbolic tangent of the specified number.
If the parameter number
is NULL
, the tanh()
function will return NULL
.
tanh()
Examples
Here are a few examples of the tanh()
function:
SELECT
tanh(-2.5) AS "tanh(-2.5)",
tanh(-1) AS "tanh(-1)",
tanh(0) AS "tanh(0)",
tanh(1) AS "tanh(1)",
tanh(2.5) AS "tanh(2.5)";
-[ RECORD 1 ]-------------------
tanh(-2.5) | -0.9866142981514303
tanh(-1) | -0.7615941559557649
tanh(0) | 0
tanh(1) | 0.7615941559557649
tanh(2.5) | 0.9866142981514303