Python math.atan() Method
Example
Find the arctangent of different numbers:
#Import math Library
import math
#find the arctangent of
different numbers
print (math.atan(0.39))
print (math.atan(67))
print (math.atan(-21))
Try it Yourself »
Definition and Usage
The math.atan()
method returns the
arctangent of a number as a value between -PI/2 and PI/2 radians.
Arctangent is also defined as an inverse tangent function of x, where x is the value of the arctangent is to be calculated.
Syntax
math.atan(x)
Parameter Values
Parameter | Description |
---|---|
x | Required. A number to find the arctangent of. If the value is not a number, it returns error a TypeError |
Technical Details
Return Value: | A float value, from -PI/2 to PI/2, representing the arctangent of
a number |
---|---|
Python Version: | 1.6.1 |