Is this just the smallest number that can be stored in 32 bits for example?
from math import inf
Is this just the smallest number that can be stored in 32 bits for example?
from math import inf
Floating-point numbers (real numbers as typically implemented on a computer) have special values reserved for positive and negative infinity. Rather than just being “the largest or smallest representable 32-bit numbers,” they act as though they really are infinite. For example, adding anything to positive infinity (other than negative infinity) gives positive infinity, and a similar rule holds for negative infinity.
For more on this, do a search for “IEEE-754 infinity.”