Easy Tutorial
❮ Python String Istitle Python Func Number Degrees ❯

Python math.atan() Method

Python math Module

Python math.atan(x) returns the arctangent of x, in radians, with the result ranging between -pi/2 and pi/2.

Python Version: 1.6.1

Syntax

The syntax for the math.atan() method is as follows:

math.atan(x)

Parameter Description:

Return Value

Returns a floating-point number representing the arctangent of a number, ranging between -pi/2 and pi/2.

Example

The following example returns the arctangent of different numbers:

Example

# Import math package
import math

# Print arctangent values
print(math.atan(0.39))
print(math.atan(67))
print(math.atan(-21))

Output result:

0.37185607384858127
1.5558720618048116
-1.5232132235179132

Python math Module

❮ Python String Istitle Python Func Number Degrees ❯