I thought this was implementation-dependent. On the only floating point
implementation I've ever looked at closely, integral numbers were not
exact unless they were powers of two. (They were stored as 0 <= m < 1
and integer e, and the value was m * 2^e)
Also, some a-priori reasoning: on my system DBL_MAX is
17976931348623157081452742373170435679807056752584499659891747680
31572607800285387605895586327668781715404589535143824642343213268
89464182768467546703537516986049910576551282076245490090389328944
07586850845513394230458323690322294816580855933212334827479782620
4144723168738177180919299881250404026184124858368
If integral numbers were exact then 'double' would have to have
1024 bits (approximately), but on my system, 'double' is 64 bits.
Let me rephrase Mr Harrison's answer.
Any integral number that can be represented in no more bits than the
mantissa is represented exactly. For IEEE double precision with 64 bits,
the mantissa is 53 bits long, it is capable of representing exactly any
integer value that has an absolute value less than or equal to 2^53 - 1
or 9,007,199,254,740,991 for any value larger than that, the value stored
is exact. However, not all values may be stored. For example, you may store
9,007,199,254,740,992 or 9,007,199,254,740,994, but not 9,007,199,254,740,993.