Python – expm1() Function – Examples & Explanation

expm1() function is used to find the e**x – 1 in Python for the given input(x – parameter).

 

Syntax of expm1() Function

The syntax of expm1() function in Python is:

 

Parameters of expm1() Function in Python

x – Where x is any valid python number (positive or negative). This parameter is required.
Note: If the x parameter is not a number, expm1() function will return an Error.

 

Compatibility

expm1() function is available and compatible with both Python 2.x and 3.x. This function is a part of python standard math library.

 

Return Value of expm1() Function in Python

expm1() function returns e**x – 1 for the given input.

 

Python expm1() Function Example


Output: