Print the positive and negative infinity:
# Import math Library
import math
# Print the positive infinity
print (math.inf)
# Print the negative infinity
print (-math.inf)
Try it Yourself » Definition and UsageThe math.inf
constant returns a floating-point positive infinity.
For negative infinity, use -math.inf
.
The inf constant is equivalent to float('inf')
.
float
value, representing the value of positive infinity Python Version: 3.5
Track your progress - it's free!
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4