Oracle - ASIN() Function
The Oracle (PL/SQL) ASIN() function returns arc sine of a value. The returned value will be in the range -𝜋/2 through 𝜋/2. In special cases it returns the following:
- If the number is not within the range of -1 to 1, then an error is returned.
Note: ASIN() is the inverse of SIN().
Syntax
ASIN(x)
Parameters
x |
Required. Specify the value. |
Return Value
Returns the arc sine of the value.
Example 1:
The example below shows the usage of ASIN() function.
ASIN(0.2) Result: .20135792079033079145512555221762341024 ASIN(0.8) Result: .927295218001612232428512462922428804041 ASIN(1) Result: 1.5707963267948966192313216916397514421 ASIN(-1) Result: -1.5707963267948966192313216916397514421 ASIN(0) Result: 0 ASIN(-0.2) Result: -.20135792079033079145512555221762341024
Example 2:
Consider a database table called Sample with the following records:
Data | x |
---|---|
Data 1 | -1 |
Data 2 | -0.5 |
Data 3 | 0 |
Data 4 | 0.5 |
Data 5 | 1 |
The statement given below can be used to calculate the arc sine of records of column x.
SELECT Sample.*, ASIN(x) AS ASIN_Value FROM Sample;
This will produce the result as shown below:
Data | x | ASIN_Value |
---|---|---|
Data 1 | -1 | -1.5707963267948966192313216916397514421 |
Data 2 | -0.5 | -.52359877559829887307710723054658381405 |
Data 3 | 0 | 0 |
Data 4 | 0.5 | .52359877559829887307710723054658381405 |
Data 5 | 1 | 1.5707963267948966192313216916397514421 |
❮ Oracle Functions