Python cmath.cos() Metode
Contoh
Cari kosinus dari bilangan kompleks:
#import cmath for complex number operations
import cmath
#find
the cosine of a complex number
print (cmath.cos(2 + 3j))
Definisi dan Penggunaan
Metode cmath.cos()
ini mengembalikan kosinus dari bilangan kompleks.
Sintaksis
cmath.cos(x)
Nilai Parameter
Parameter | Description |
---|---|
x | Required. A number to find the cosine of |
Detail Teknis
Nilai Kembali: | Nilai complex , yang mewakili kosinus dari bilangan kompleks |
---|---|
Versi Python: | 1.5 |