The Hidden Bit Trick
The hidden bit trick, also called the implicit bit trick, is a clever optimization used in the IEEE 754 standard for representing numbers in binary. It reduces memory usage by omitting the leading bit of the significand (also called the mantissa) when it is guaranteed to be 1. This trick gives us one extra bit of precision for free.
Recall from the introduction to floating point numbers that an IEEE 754 double-precision floating point number is represented as:
That leading
Subnormal numbers
The special case where the exponent is all zeros after biasing is used to represent subnormal numbers which are very close to zero. In this case, the number is interpreted as
Notice that we use the smallest possible exponent, which is actually