{"id":24244,"date":"2021-10-14T09:19:06","date_gmt":"2021-10-14T03:49:06","guid":{"rendered":"https:\/\/python-programs.com\/?p=24244"},"modified":"2021-11-05T21:02:12","modified_gmt":"2021-11-05T15:32:12","slug":"python-program-for-expm1-function","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-for-expm1-function\/","title":{"rendered":"Python Program for expm1() Function"},"content":{"rendered":"

In the previous article, we have discussed Python Program for exp() Function<\/a>
\nexpm1() Function in Python:<\/strong><\/p>\n

Ex<\/sup>\u00a0– 1 is returned by the math.expm1() method.<\/p>\n

‘E’ is the natural logarithmic system’s base (approximately 2.718282), and x is the number passed to it.<\/p>\n

This function is more precise than using math. exp() and subtracting 1.<\/p>\n

Syntax:<\/strong><\/p>\n

math.expm1(x)<\/pre>\n

Parameters:<\/strong><\/p>\n

x: <\/strong>This is required. It is a number. The exponent is specified.<\/p>\n

Return Value:<\/strong><\/p>\n

It returns a value float value which represents \u00a0Ex<\/sup> – 1.<\/p>\n

Examples:<\/strong><\/p>\n

Example1:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given Number = 3<\/pre>\n

Output:<\/strong><\/p>\n

The result after applying expm1() function on above given number 3  =  19.085536923187668<\/pre>\n

Example2:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given Number = 5.5<\/pre>\n

Output:<\/strong><\/p>\n

The result after applying expm1() function on above given number 5.5  =  243.69193226422038<\/pre>\n

Program for expm1() Function in Python<\/h2>\n