Home >>Python math Module >Python math.expm1() Method

Python math.expm1() Method

Python math.expm1() Method

Python math.expm1() Method In python is used to calculate the power of E and subtracts One from it like Ex-1 (Where E is Euler's number approximately equal to 2.71828).

Syntax:
math.expm1(x)

Parameter Values

Parameter Description
x It is required a number to calculate the exponential Ex.
Here is an example of Python math.expm1() Method:

import math  
print(math.expm1(12))
print(math.expm1(-33.07))

Output:
162753.79141900392
-0.9999999999999957
Example 2:

import math  
print(math.expm1(-1))
print(math.expm1(0.67))

Output:
-0.6321205588285577
0.9542373206359396

No Sidebar ads