Python math.asin() Method
Python math.asin(x) Returns the arcsine of x, with the result in the range -pi/2 to pi/2.
math.asin() accepts arguments from -1 to 1.
Python version: 1.4
Syntax
The syntax of the math.asin() method is as follows:
math.asin(x)
Parameter Description:
- x -- required, a number between -1 and 1. If x is not a number, a TypeError is returned.
Return Value
Returns a floating-point number representing the arcsine of a number.
Example
The following example returns the arcsine of different numbers:
Example
Import the math package
import
math
Output the arcsine values
(
math
.
asin
(
0.55
)
)
(
math
.
asin
(
0.55
)
)
(
math
.
asin
(
0
)
)
(
math
.
asin
(
1
)
)
(
math
.
asin
(
1
)
)
Output result:
0.5823642378687435
-0.5823642378687435
0.0
1.5707963267948966
-1.5707963267948966
Python math Module