arogozhnikov / python3_with_pleasure

A short guide on features of Python 3 with examples
3.63k stars 242 forks source link

math.inf is float("inf"), which is really infinite #27

Closed lebigot closed 5 years ago

lebigot commented 6 years ago

math.inf is not "the largest number" (which sounds like it's the maximum finite float, sys.float_info.max): it is instead precisely the representation of infinity as a float.