Floating-point addition 2026-10-31
To add two finite floating-point numbers, compare their exponents, shift the smaller significand to a common exponent, add or subtract the signed significands, normalize the result, and apply floating-point rounding. Extra low-order bits are needed to determine correct rounding when shifting or cancellation discards information. A carry beyond the leading digit increases the exponent; cancellation can decrease it. Unlike exact real addition, this operation need not be associative. Changing the child evaluation order in a fixed binary expression tree need not change its parenthesization, whereas reassociation changes which intermediate results undergo floating-point rounding.
Floating-point representation Created 2026-10-20 Updated 2026-11-05
A finite normal floating-point representation stores a sign, a significand and a bounded integer exponent, representing in radix . Fixing the number of significand digits gives roughly constant relative precision across a wide dynamic range; the gap between adjacent representable values grows with the exponent.
For example, in the binary numeral system. The normal leading binary digit is one and can be implicit in storage. Subnormal numbers use a different leading-digit rule near zero. IEEE formats also reserve encodings for signed zero, infinities and NaN, so the bit pattern cannot always be interpreted by the normal finite formula.[ref]
Both signs are positive, so perform addition of the aligned significands. The true exponents are and , a difference of four. Shift the smaller significand right four places, retaining its low bits:
Add at the common exponent:
Renormalization raises the true exponent to and the biased exponent to . There are only seven fraction places to retain, so no floating-point rounding changes the result:
The complete word is 0100110000001000.
Significand 2026-10-31
The significant-digit factor in a floating-point representation , where is the sign bit, the radix and the exponent. For a normal positive binary significand, , and the leading one need not be stored. In a subnormal number, the leading digit is zero at the minimum normal exponent scale. The significand is a numerical factor, distinct from the stored trailing fraction bits that encode part of it.