YouTip LogoYouTip

Python3 Func Number Asin

Python3 asin() Function body { font-family: Arial, sans-serif; line-height: 1.6; margin: 20px; } h1, h2, h3 { color: #333; } code { background-color: #f4f4f4; padding: 2px 5px; border-radius: 3px; } pre { background-color: #f4f4f4; padding: 10px; border-radius: 5px; overflow-x: auto; } .nav { margin-bottom: 20px; } .nav a { margin-right: 15px; text-decoration: none; color: #007bff; } .nav a:hover { text-decoration: underline; } .example { margin: 20px 0; } .output { margin-top: 10px; }

Python3 asin() Function

Python 3 Tutorial

Python3 Tutorial | Python3 Numbers


Description

asin() returns the arc sine of x, in radians.


Syntax

Here is the syntax for the asin() method:

import math
math.asin(x)

Note: asin() cannot be accessed directly, you need to import the math module and then call this method via the math static object.


Parameters

  • x -- A numeric value between -1 and 1. If x is greater than 1, it will produce an error.

Return Value

Returns the arc sine of x in radians.


Example

The following example demonstrates the use of 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))

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

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

Python3 Numbers

← Python3 Func Number AsinPython3 Func Number Uniform β†’