Python math.exp() Method
Example
Return 'E' raised to the power of different numbers:
#Import math Library
import math
#find the exponential of the
specified value
print(math.exp(65))
print(math.exp(-6.89))
Try it Yourself »
Definition and Usage
The math.exp()
method returns E raised to the power of x (Ex).
'E' is the base of the natural system of logarithms (approximately 2.718282) and x is the number passed to it.
Syntax
math.exp(x)
Parameter Values
Parameter | Description |
---|---|
x | Required. Specifies the exponent |
Technical Details
Return Value: | A float value, representing 'E' raised to the power of x |
---|---|
Python Version: | 1.6.1 |
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.