PostgreSQL SINH() Function
The PostgreSQL SINH() function returns hyperbolic sine of a value. The hyperbolic sine of x is defined as:
where e is an Euler's number.
Syntax
SINH(x)
Parameters
x |
Required. Specify the value. |
Return Value
Returns the hyperbolic sine of a value.
Example 1:
The example below shows the usage of SINH() function.
SELECT SINH(0); Result: 0 SELECT SINH(1); Result: 1.1752011936438014 SELECT SINH(-1); Result: -1.1752011936438014 SELECT SINH(2); Result: 3.626860407847019 SELECT SINH(-2); Result: -3.626860407847019
Example 2:
Consider a database table called Sample with the following records:
Data | x |
---|---|
Data 1 | 0 |
Data 2 | 0.5 |
Data 3 | 1 |
Data 4 | 1.5 |
Data 5 | 2 |
The statement given below can be used to calculate the hyperbolic sine of values of column x.
SELECT *, SINH(x) AS SINH_Value FROM Sample;
This will produce the result as shown below:
Data | x | SINH_Value |
---|---|---|
Data 1 | 0 | 0 |
Data 2 | 0.5 | 0.5210953054937474 |
Data 3 | 1 | 1.1752011936438014 |
Data 4 | 1.5 | 2.1292794550948173 |
Data 5 | 2 | 3.626860407847019 |
❮ PostgreSQL Functions