Python cmath.tan() Method
Example
Find the tangent of a complex number:
#Import cmath Library
import cmath
#Return the tangent of a
complex number
print (cmath.tan(2 + 3j))
Try it Yourself »
Definition and Usage
The cmath.tan()
method returns the tangent
of a complex number.
Syntax
cmath.tan(x)
Parameter Values
Parameter | Description |
---|---|
x | Required. A number to find the tangent of. If the value is not a number, it returns a TypeError |
Technical Details
Return Value: | A complex value, representing the tangent of a
complex number |
---|---|
Python Version: | 1.5 |
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.