Home >>Python cmath Module >Python cmath.exp() Method

Python cmath.exp() Method

Python cmath.exp() Method

Python cmath.exp() method in python is used to returns the exponential value and accepts a number and If the number is x, it returns e**x where e is the base of natural logarithms.

Syntax:
cmath.exp(x)

Parameter Values

Parameter Description
X It is Required to find exponential value of a number.
Here is an example of Python cmath.exp() Method:

import cmath
print (cmath.exp(2 + 1))

Output:
(20.085536923187668+0j)
Example 2:

import cmath
print (cmath.exp(2 + 2))

Output:
(54.598150033144236+0j)