The cmath(complex math) module in the standard library provides mathematical functions for working with complex numbers. The cos() function in this module is used to find the cosine of a given complex number.
cmath.cos(x)
x |
The angle in radians(real or complex) whose cosine should be calculated |
The function returns a complex value representing the cosine of the input value, x
.