Méthode Python cmath.cos()
Exemple
Trouver le cosinus d'un nombre complexe :
#import cmath for complex number operations
import cmath
#find
the cosine of a complex number
print (cmath.cos(2 + 3j))
Définition et utilisation
La cmath.cos()
méthode renvoie le cosinus d'un nombre complexe.
Syntaxe
cmath.cos(x)
Valeurs des paramètres
Parameter | Description |
---|---|
x | Required. A number to find the cosine of |
Détails techniques
Valeur de retour : | Une complex valeur, représentant le cosinus d'un nombre complexe |
---|---|
Version Python : | 1.5 |