Home >>Python cmath Module >Python cmath.tan() Method

Python cmath.tan() Method

Python cmath.tan() Method

Python cmath.tan() method is used to returns the tangent of a complex number

Syntax:
cmath.tan(x)

Parameter Values

Parameter Description
x It is a required parameter to find the tangent of a number.It returns a TypeError If the value is not a number
Here is an Example of Python cmath.tan() Method:

import cmath  
print (cmath.tan(3 + 5j))

Output:
(-2.536867620767603e-05+0.9999128201513537j)
Example 2:

import cmath  
print (cmath.tan(3 + 1j))

Output:
(-0.05916853956605073+0.768017647286911j)

No Sidebar ads