Metoda cmath.cos() Pythonu
Příklad
Najděte kosinus komplexního čísla:
#import cmath for complex number operations
import cmath
#find
the cosine of a complex number
print (cmath.cos(2 + 3j))
Definice a použití
Metoda cmath.cos()
vrací kosinus komplexního čísla.
Syntax
cmath.cos(x)
Hodnoty parametrů
Parameter | Description |
---|---|
x | Required. A number to find the cosine of |
Technické údaje
Návratová hodnota: | Hodnota complex představující kosinus komplexního čísla |
---|---|
Verze Pythonu: | 1.5 |