No, not a bug. Floating point types like double have a large range, but only finite precision. Whereas longs can only represent values from (roughly) plus or minus 2 billion, doubles can represent values between plus and minus 10^308 -- hundreds of orders of magnitude larger. But to get that range, you have to sacrifice precision. Whereas in a long, all 64 bits are dedicated to representing the exact value, in a double, nine bits or so are held aside to represent the exponent, and the rest hold the "mantissa", the specific value. So as it turns out, as far as double is concerned, Long.MAX_VALUE and Long.MAX_VALUE + 1 are identical.