PostgreSQL Tutorial PostgreSQL Advanced PostgreSQL Database Account Management PostgreSQL References
PostgreSQL Tutorial PostgreSQL Advanced PostgreSQL Database Account Management PostgreSQL References

PostgreSQL ACOSH() Function



The PostgreSQL ACOSH() function returns inverse hyperbolic cosine of a value. The inverse hyperbolic cosine of x is defined as:

acosh

If the argument is less than 1, then this function returns an error.

Syntax

ACOSH(x)

Parameters

x Required. Specify the value.

Return Value

Returns the inverse hyperbolic cosine of the value.

Example 1:

The example below shows the usage of ACOSH() function.

SELECT ACOSH(1);
Result: 0

SELECT ACOSH(2);
Result: 1.3169578969248166

SELECT ACOSH(3);
Result: 1.762747174039086

SELECT ACOSH(4);
Result: 2.0634370688955608

SELECT ACOSH(5);
Result: 2.2924316695611777

Example 2:

Consider a database table called Sample with the following records:

Datax
Data 11
Data 25
Data 310
Data 450
Data 5100

The statement given below can be used to calculate the inverse hyperbolic cosine of records of column x.

SELECT *, ACOSH(x) AS ACOSH_Value FROM Sample;

This will produce the result as shown below:

DataxACOSH_Value
Data 110
Data 252.2924316695611777
Data 3102.993222846126381
Data 4504.6050701709847575
Data 51005.298292365610484

❮ PostgreSQL Functions