Python cmath.exp() Methode
Voorbeeld
Vind de exponentieel van een complex getal:
#import cmath for complex number operations
import cmath
#find
the exponential of a complex number
print (cmath.exp(2 + 3j))
Definitie en gebruik
De cmath.exp()
methode accepteert een complex getal en retourneert de exponentiële waarde. Als het getal x is, retourneert het e**x waarbij e het grondtal is van natuurlijke logaritmen.
Syntaxis
cmath.exp(x)
Parameterwaarden
Parameter | Description |
---|---|
x | Required. A number to find exponential value of. |
Technische details
Winstwaarde: | Een complex waarde, die de exponentiële waarde van een complex getal weergeeft |
---|---|
Python-versie: | 1.5 |