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.

Similar Posts

Questions, corrections, or additional insights?

This site uses Akismet to reduce spam. Learn how your comment data is processed.