Denormalized (Subnormal) Numbers in IEEE 754
Learn about denormalized (subnormal) floating-point numbers that fill the gap between zero and the smallest normalized float, enabling gradual underflow.
Decimal Value
1.4e-45
Float32 Hex
0x00000001
Float64 Hex
0x36A0000000000000
Detailed Explanation
Denormalized numbers (also called subnormal numbers) are a special category of IEEE 754 floating-point values that represent extremely small numbers near zero. They exist to provide gradual underflow instead of an abrupt gap between zero and the smallest normalized number.
What makes a number denormalized:
A floating-point number is denormalized when its biased exponent field is all zeros and its mantissa is non-zero. Unlike normalized numbers, denormalized numbers have an implicit leading 0 instead of 1.
| Property | Normalized | Denormalized |
|---|---|---|
| Exponent bits | 1 to 254 (float32) | 0 |
| Implicit bit | 1 | 0 |
| Formula | (-1)^s x 1.mantissa x 2^(exp-bias) |
(-1)^s x 0.mantissa x 2^(1-bias) |
The smallest float32 values:
- Smallest normalized:
2^-126 ≈ 1.175e-38(exponent = 1, mantissa = 0) - Smallest denormalized:
2^-149 ≈ 1.401e-45(exponent = 0, mantissa = 1 in last bit)
Without denormalized numbers, there would be a gap from 0 to 1.175e-38 with no representable values.
Gradual underflow:
Consider what happens as values get smaller:
- Normalized values shrink until the exponent reaches its minimum (1)
- Further reduction shifts mantissa bits right, losing precision gradually
- The number becomes denormalized — precision decreases smoothly toward zero
- When all mantissa bits are zero, the value becomes exactly zero
This gradual underflow preserves the important property that x - y == 0 implies x == y for floating-point values. Without denormalized numbers, two different small values could both round to zero when subtracted.
Performance considerations:
On some processors (especially older x86 CPUs and some ARM cores), arithmetic with denormalized numbers is significantly slower than with normalized numbers — sometimes 10-100x slower. This is called the "denormal penalty." Some applications set the FTZ (flush-to-zero) flag to treat denormalized results as zero for performance reasons, accepting the loss of gradual underflow.
The value 1.4e-45 (smallest float32 subnormal):
The hex representation 0x00000001 has exponent = 0 and only the least significant mantissa bit set. This represents 0.000...001 x 2^(-126) = 2^(-149) ≈ 1.401e-45.
Use Case
Understanding denormalized numbers matters when working on numerical libraries, GPU compute shaders (where denormals may be flushed to zero), embedded systems with limited floating-point support, and any application where very small values near zero are significant.