PostgreSQL ASINH() Function
The PostgreSQL ASINH() function returns inverse hyperbolic sine of a value. The inverse hyperbolic sine of x is defined as:
Syntax
ASINH(x)
Parameters
x |
Required. Specify the value. |
Return Value
Returns the inverse hyperbolic sine of the value.
Example 1:
The example below shows the usage of ASINH() function.
SELECT ASINH(1); Result: 0.881373587019543 SELECT ASINH(2); Result: 1.4436354751788103 SELECT ASINH(3); Result: 1.8184464592320668 SELECT ASINH(-1); Result: -0.881373587019543 SELECT ASINH(-2); Result: -1.4436354751788103
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 | -5 |
Data 5 | -10 |
The statement given below can be used to calculate the inverse hyperbolic sine of records of column x.
SELECT *, ASINH(x) AS ASINH_Value FROM Sample;
This will produce the result as shown below:
Data | x | ASINH_Value |
---|---|---|
Data 1 | 1 | 0.881373587019543 |
Data 2 | 5 | 2.3124383412727525 |
Data 3 | 10 | 2.99822295029797 |
Data 4 | -5 | -2.3124383412727525 |
Data 5 | -10 | -2.99822295029797 |
❮ PostgreSQL Functions