PostgreSQL acosh() Function

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

acosh() Syntax

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

acosh(number)

Parameters

number

Required. The number used to compute the inverse hyperbolic cosine. It must be a value greater than 1 or equal to 1.

Return value

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

If the value of the parameter is less than 1, the acosh() function will throw an error: “input out of range”.

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

acosh() Examples

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

SELECT
    acosh(1) AS "acosh(1)",
    acosh(2) AS "acosh(2)",
    acosh(2000) AS "acosh(2000)";
-[ RECORD 1 ]-------------------
acosh(1)    | 0
acosh(2)    | 1.3169578969248166
acosh(2000) | 8.294049577602022