PLSQL | SINH Function
The PLSQL SINH function is used to return the hyperbolic sine of a numeric value. The SINH function accepts one parameter which is the number whose hyperbolic sine needs to be calculated. The SINH function returns a value of the numeric data type.
This function takes as an argument any numeric data type as well as any non-numeric data type that can be implicitly converted to a numeric data type. If in any case, the argument is BINARY_FLOAT, then the SINH function returns BINARY_DOUBLE.
Syntax:
SINH(number)
Parameters Used:
number – It is used to specify the number whose hyperbolic sine needs to be calculated.
Return Value:
The SINH function in PLSQL returns a numeric value.
Supported Versions of Oracle/PLSQL:
- Oracle 12c
- Oracle 11g
- Oracle 10g
- Oracle 9i
- Oracle 8i
Example-1: Using positive numeric value as an argument in the SINH function.
DECLARE Test_Number1 number := 0.5; BEGIN dbms_output.put_line(SINH(Test_Number1)); END;
Output
0.5210953054937473616224256264114915591057
Example-2: Using 0 value as an argument in the SINH function.
DECLARE Test_Number1 number := 0; BEGIN dbms_output.put_line(SINH(Test_Number1)); END;
Output:
0
Example-3: Using 1 value as an argument in the SINH function.
DECLARE Test_Number1 number := 1; BEGIN dbms_output.put_line(SINH(Test_Number1)); END;
Output:
1.17520119364380145688238185059560081516
Example-4: Using a negative value as an argument in the SINH function.
DECLARE Test_Number1 number := -5; BEGIN dbms_output.put_line(SINH(Test_Number1)); END;
Output:
-74.20321057778875897700947199606456559957
Example-5: Using SINH function with select query and returning the value in degrees.
select (SINH(5)) * 57.29 FROM dual;
Output:
4251.10193
Using the conversion formula of 1 radian = 57.29 degrees.
Advantage:
The SINH function accepts any numeric datatype as well as any non-numeric datatype as an argument that can be implicitly converted to a numeric datatype.