TANH

TANH is a mathematical function in SQL that lets you compute the hyperbolic tangent of a specified float value. It returns the ratio of the hyperbolic sine and the hyperbolic cosine of the given value. The TANH function can be useful in scientific computation scenarios.

Example

SELECT TANH(1) AS TanhValue;

Output

+------------------+
| TanhValue |
+------------------+
| 0.761594155955765|
+------------------+

Explanation

The TANH function computes the hyperbolic tangent of a number. In the example above, the TANH function calculates the hyperbolic tangent of 1, which results in 0.761594155955765.

Example

SELECT TANH(0.5) as Result;

Output

Result
----------
0.46211716

Explanation

The TANH function in PostgreSQL calculates the hyperbolic tangent of the specified number. In this case, the hyperbolic tangent of 0.5 is approximately 0.46211716.

For in-depth explanations and examples SQL keywords where you write your SQL, install our extension.