isinf()

isinf(number) returns Boolean , True if the input number is positive infinite or negative infinity, False otherwise.
isinf(n)  

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

Subscribe to our YouTube Channel here


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-2024 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer