Latest web development tutorials

Python asin () function

Python figures Python figures


description

asin () Returns the arc sine of x radians.


grammar

The following is the syntax asin () method:

import math

math.asin(x)

Note: asin () is not directly accessible, you need to import math module, and then call the method by math static objects.


parameter

  • x - values ​​between -1 and 1. If x is greater than 1, it will generate an error.

return value

Returns the arc sine of x radians.


Examples

The following shows an example of the use of asin () method:

#!/usr/bin/python
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)

After running the above example output is:

asin(0.64) :  0.694498265627
asin(0) :  0.0
asin(-1) :  -1.57079632679
asin(1) :  1.57079632679

Python figures Python figures