SQLite ACOSH() Function
The SQLite ACOSH() function returns inverse hyperbolic cosine of a value. The inverse hyperbolic cosine of x is defined as:
If the argument is less than 1, then this function returns NULL.
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.0 SELECT ACOSH(2); Result: 1.31695789692482 SELECT ACOSH(3); Result: 1.76274717403909 SELECT ACOSH(4); Result: 2.06343706889556 SELECT ACOSH(5); Result: 2.29243166956118
Example 2:
Consider a database table called Sample with the following records:
Data | x |
---|---|
Data 1 | 1 |
Data 2 | 5 |
Data 3 | 10 |
Data 4 | 50 |
Data 5 | 100 |
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:
Data | x | ACOSH_Value |
---|---|---|
Data 1 | 1 | 0.0 |
Data 2 | 5 | 2.29243166956118 |
Data 3 | 10 | 2.99322284612638 |
Data 4 | 50 | 4.60507017098476 |
Data 5 | 100 | 5.29829236561048 |
❮ SQLite Functions