Math Functions
math.tan()
Compute tangent of an angle in radians. Near odd multiples of pi/2, floating-point approximation can produce very large finite results.
Formal Syntax & Structure
python syntaxpython
math.tan(x, /)Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| x | real number | Input real value. |
Return Value
float
Floating-point result; finite precision and domain restrictions apply.
Working Example
Example Snippetpython
import mathprint(math.tan(0))