expm1()

expm1() returns e raised to the power x ( input number ) -1 .
Here are some examples with different type of numbers.
import math
print(math.expm1(5))   # 147.4131591025766
print(math.expm1(0))   # 0.0
Using negative number
import math
print(math.expm1(-34.11))   # -0.9999999999999984
print(math.expm1(-34.99))   # -0.9999999999999993
print(math.expm1(-34))      # -0.9999999999999983

Using formula and e

The math formula for expm1() function is e ** x -1
import math
print(math.e ** -34.11 -1 ) # -0.9999999999999984
e : is a numerical constant of value equal to 2.71828
This is the base of natural logarithm and known as Euler's number.

floor() & ceil() modf() exp()

Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com



    Post your comments , suggestion , error , requirements etc here





    Python Video Tutorials
    Python SQLite Video Tutorials
    Python MySQL Video Tutorials
    Python Tkinter Video Tutorials
    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2021 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer