Underflow
Underflow concerns a floating-point result whose magnitude is too small for the normal range of its format. With gradual underflow, the result can be rounded to a subnormal value or to zero. It is not limited to positive values, and being below the smallest positive normal value does not automatically mean becoming zero.
For binary64, the smallest positive normal value is about 2.225 ร 10โปยณโฐโธ. Positive subnormal values extend down to about 4.94 ร 10โปยณยฒโด. Their spacing stays fixed while their magnitude shrinks, so they have fewer effective significant digits and lower relative precision. In an environment preserving subnormals, 10โปยณยนโฐ is nonzero. The exact value 10โปโดโฐโฐ is too small and rounds to zero under round-to-nearest.
A distinction matters when diagnosing flags: a tiny result that is represented exactly does not necessarily signal an underflow exception. A result that is both tiny and inexact is the usual condition. Some execution environments flush subnormal values to zero, so the formatโs theoretical range alone does not establish runtime behavior.
Multiplying two binary64 values near 10โปยฒโฐโฐ produces zero even though the mathematical product is positive. If the application needs log probabilities, sum their logarithms before forming the product. Taking the logarithm after the product has become zero cannot recover it. Rescaling, log-space computation, or another numeric format may help, but converting back to an insufficient floating-point range can underflow again.
References
For worked storage examples, see How Computers Store Data.
Discover more from Insightful Data Lab
Subscribe to get the latest posts sent to your email.
