Python tan function

Python tan(x) function calculates the tangent value of radian angle x. It's a method of math module.

>>> import math
>>> math.tan(math.pi)
-1.2246467991473532e-16
>>> math.tan(math.pi/2)
1.633123935319537e+16
>>> math.tan(math.pi/6)
0.5773502691896257
>>> math.tan(0)
0.0

y=tangent(x) Graph

X
(deg)
X
(Rad)
tangent(X)
180 ̊ π 0
150 ̊ 5π/6 -0.57735
135 ̊ 3π/4 -1
120 ̊ 2π/3 -1.732051
90 ̊ π/2 Out of Range
60 ̊ π/3 1.732051
45 ̊ π/4 1
30 ̊ π/6 0.57735
0 ̊ 0 0

Tangent Functions
1. Tangent(-x) = -Tangent(x);

endmemo.com © 2024  | Terms of Use | Privacy | Home