Reputation: 33092
Are there constants for infinity in python?
The only way I found was to parse the values from a string.
INF = float("inf")
NINF = float("-inf")
Upvotes: 3
Views: 265
Reputation: 798606
No. Even fpconst
generates them by unpacking the IEEE 754 bit sequences.
Upvotes: 4