64-bit Integer and 64-bit Float: Who Has More Values?
In 64-bit, an integer (2 ^ 64 for a two-piece machine) has more unique values.
However, 64-bit float has a much wider range of values.
This can be trivially argued because a 64-bit integer has a unique bit pattern for each unique value (it's "100% efficient"), while a 64-bit float has a dedicated sign bit (which allows - 0, but - 0 == 0 is true ), as well as a few "special patterns" (like one
that has multiple representations ), thereby reducing the total number of unique values that a float can represent.