Python cmath.exp() Method

❮ cmath Methods


Example

Find the exponential of a complex number:

#import cmath for complex number operations
import cmath

#find the exponential of a complex number
print (cmath.exp(2 + 3j))
Try it Yourself »

Definition and Usage

The cmath.exp() method accepts a complex number and returns the exponential value. 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 Required. A number to find exponential value of.

Technical Details

Return Value: A complex value, representing the exponential of a complex number
Python Version: 1.5

❮ cmath Methods

Copyright 1999-2023 by Refsnes Data. All Rights Reserved.