Metoda cmath.cos() Pythona
Przykład
Znajdź cosinus liczby zespolonej:
#import cmath for complex number operations
import cmath
#find
the cosine of a complex number
print (cmath.cos(2 + 3j))
Definicja i użycie
Metoda cmath.cos()
zwraca cosinus liczby zespolonej.
Składnia
cmath.cos(x)
Wartości parametrów
Parameter | Description |
---|---|
x | Required. A number to find the cosine of |
Szczegóły techniczne
Wartość zwrotu: | Wartość complex reprezentująca cosinus liczby zespolonej |
---|---|
Wersja Pythona: | 1,5 |