Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Python math.asin() Method

Python math.asin() Method

Python math Module Python math Module

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:

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

print

(

math

.

asin

(

0.55

)

)

print

(

math

.

asin

(

0.55

)

)

print

(

math

.

asin

(

0

)

)

print

(

math

.

asin

(

1

)

)

print

(

math

.

asin

(

1

)

)

Output result:


0.5823642378687435
-0.5823642378687435
0.0
1.5707963267948966
-1.5707963267948966

Python math Module Python math Module