back

by raphlinus·3y ago·view on hn ↗
This is 0x3f800002, which should look pretty familiar to people who work with floating point in hex; it's 2 + the representation of 1.0. To understand the lowest order bits, you've got -0.0 (0x80000000) in there, as well as everything from 0.0 (0x00000000) to 1.0 (0x3f800000) inclusive.

This is a larger number than the one cited in the post because the latter only includes "normal" numbers. This includes the "denormals" as well.

It's very easy to generalize this to 64 bits, there are 4,607,182,418,800,017,410 of them.