Python 3.15+mathfunction
math.issubnormal()
checks
True if x is a subnormal number: finite, nonzero and smaller in magnitude than sys.float_info.min. Such numbers lose precision.
Syntax
math.issubnormal(x)
Subnormal numbers fill the gap between zero and the smallest normal float by giving up mantissa bits: the closer to zero, the fewer significant digits remain. They show up in computations where values decay (physical simulations, probabilities) and signal that it is time to switch to logarithms or rescaling. Zero is not considered subnormal.
Examples
import math, sys
tiny = sys.float_info.min / 1024
print(math.issubnormal(tiny)) # → True
print(math.issubnormal(0.0), math.issubnormal(1e-300)) # → False False
See also
Open in the full glossarydocs.python.orgReport an inaccuracy