isfinite()

All Math methods

isfinite(number) returns Boolean , True if the input number is finite, returns False otherwise.
isfinite(n)  

Example
import math
print(math.isfinite(2))     # True
print(math.isfinite(-2))    # True
print(math.isfinite(0.0))   # True 
print(math.isfinite(0/1))   # True 
print(math.isfinite(0.0/1)) # True  
Note : 0.0 is considered finite.
import math
print(math.isfinite(float('inf')))   # False
print(math.isfinite(float('-inf')))  # False
print(math.isfinite(float('nan')))   # False 

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