Méthode Python cmath.exp()
Exemple
Trouver l'exponentielle d'un nombre complexe :
#import cmath for complex number operations
import cmath
#find
the exponential of a complex number
print (cmath.exp(2 + 3j))
Définition et utilisation
La cmath.exp()
méthode accepte un nombre complexe et renvoie la valeur exponentielle. Si le nombre est x, il renvoie e**x où e est la base des logarithmes naturels.
Syntaxe
cmath.exp(x)
Valeurs des paramètres
Parameter | Description |
---|---|
x | Required. A number to find exponential value of. |
Détails techniques
Valeur de retour : | Une complex valeur, représentant l'exponentielle d'un nombre complexe |
---|---|
Version Python : | 1.5 |