When does the IEEE-754 64-bit float break as a counter
IEEE floating point format has a sign bit,  an 11 bit exponent (ranging from -1022 to 1023) and a 52-bit mantissa with an implicit "1" in the 53rd bit.

Thus, the largest integer that can be represented without rounding is the binary number with 53 "1"s, $2^{53}-1$ = 9,007,199,254,740,991 ~ 9e15 &lt; 1e16.  After that you start having to round off low order bits.  So it looks like your experiment produced the right order of magnitude.