Tutorialspoint

How to find the value closest to negative infinity in Python?

How to find the value closest to negative infinity in Python?                                             


1 Answer
Jayashree

Although infinity doesn't have a concrete representation, the closest number to negative infinity is represented as return value of float() function with '-inf' as argument

>>> a=float('-inf')
>>> a
-inf
Advertisements

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.