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

Python3 asin() Function

Python3 asin() Function

Python3 Numbers Python3 Numbers


Description

asin() Returns the arc sine of x in radians.


Syntax

The syntax of the asin() method is as follows:


import math

math.asin(x)

**Note:** asin() cannot be accessed directly; you need to import the math module and call the method through the static math object.


Parameters


Return Value

Returns the arc sine of x in radians.


Example

The following shows examples of using the asin() method:


#!/usr/bin/python3
import math

print ("asin(0.64) : ",  math.asin(0.64))
print ("asin(0) : ",  math.asin(0))
print ("asin(-1) : ",  math.asin(-1))
print ("asin(1) : ",  math.asin(1))

Running the example above produces:


asin(0.64) :  0.694498265626556
asin(0) :  0.0
asin(-1) :  -1.5707963267948966
asin(1) :  1.5707963267948966

Python3 Numbers Python3 Numbers