C asin() function
C asin() function - Calculate arcsine
The asin() function is used to calculate the arcsine of x, in the range -π/2 to π/2 radians.
Syntax:
double asin(double x)
Parameters:
Name | Description | Required /Optional |
---|---|---|
x | Value whose arcsine is to be calculated. | Required |
Return value from asin()
- Returns the arcsine (the inverse sine function) of x in the range -π/2 to π/2 radians.
Example: asin() function
The following example shows the usage of asin() function:
Output:
Input the value of x: 0 asin(0.000000) = 0.000000 Input the value of x: 1.5 Error: 1.500000 not in the range! Input the value of x: -1.5 Error: -1.500000 not in the range!
C Programming Code Editor:
Previous C Programming: C acos()
Next C Programming: C atan()