PostgreSQL cosh() Function

The PostgreSQL cosh() function returns the hyperbolic cosine of the specified number.

cosh() Syntax

This is the syntax of the PostgreSQL cosh() function:

cosh(number)

Parameters

number

Required. The number used to calculate the hyperbolic cosine.

Return value

The PostgreSQL cosh() function returns the hyperbolic cosine of the specified number.

If the parameter number is NULL, the cosh() function will return NULL.

cosh() Examples

Here are a few examples of the cosh() function:

SELECT
    cosh(-1000) AS "cosh(-1000)",
    cosh(-2.5) AS "cosh(-2.5)",
    cosh(-0.2) AS "cosh(-0.2)",
    cosh(0) AS "cosh(0)",
    cosh(0.2) AS "cosh(0.2)",
    cosh(2.5) AS "cosh(2.5)",
    cosh(1000) AS "cosh(1000)";
-[ RECORD 1 ]------------------
cosh(-1000) | Infinity
cosh(-2.5)  | 6.132289479663687
cosh(-0.2)  | 1.020066755619076
cosh(0)     | 1
cosh(0.2)   | 1.020066755619076
cosh(2.5)   | 6.132289479663687
cosh(1000)  | Infinity