Python Number asin() Method


Contents

Description

The asin() method in Python number from its math module returns the arc sine of x in radians. The Python asin() function belongs to one of the Python Math modules, that calculates the trigonometry Arc Sine of the specified expression. The Python asin or Arc Sine is also known as the inverse of a Sine

Syntax

Here is the syntax for asin() method:

asin(x)

Note − One cannot access this function directly, so it is required to import the math module in Python and then we are supposed to call this function making use of the math static object.

Parameters

  • x − This should be a numeric value lying in the range -1 to 1. In case x is greater than 1 then it would generate an error.

Return Value

This method in the Python math module returns the arc sine of x, in radians.

Example

The example below shows the usage 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)

When the above program is run, it produces following result:

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

Here at Intellinuts, we have created a complete Python tutorial for Beginners to get started in Python.



Navigation
Tutorial
Tutorial
Tutorial