A 64-bit floating-point number (a.k.a. “double precision”) can perfectly represent all values of a 32 bit integers. References c++ - Are all integer values perfectly represented as doubles? - Stack Overflow