The ASIN() function calculates the arc sine (inverse sine) of a given numeric value.
Syntax
ASIN(number)
Definition and Usage
- The
ASIN()function returns the arc sine of a number in radians. - The result is within the range [−π2,π2][- \frac{\pi}{2}, \frac{\pi}{2}] (-1.5708 to 1.5708 approximately).
- The input value must be between -1 and 1. If the value is outside this range, the function returns
NULL.
Parameter Values
| Parameter | Description |
|---|---|
number |
Required. A numeric value between -1 and 1. |
Technical Details
- Works in: From MySQL 4.0
Examples
Example 1: Arc sine of a positive number
SELECT ASIN(0.25);
Result:
0.2526802551420786
Example 2: Arc sine of a negative number
SELECT ASIN(-0.8);
Result:
-0.9272952180016123
Example 3: Arc sine of 1
SELECT ASIN(1);
Result:
1.5707963267948966
Example 4: Arc sine of -1
SELECT ASIN(-1);
Result:
-1.5707963267948966
Example 5: Input outside the range
SELECT ASIN(1.5);
Result:
NULL
Usage Notes
- Use the
ASIN()function for trigonometric calculations or geometry problems requiring the inverse sine. - To convert radians to degrees, multiply the result by 180π\frac{180}{\pi}:
SELECT ASIN(0.25) * (180 / PI());
Result in degrees:
14.47751218592992