That's a problem because, for example it means 9999999999999999 is equal to 10000000000000000. Floating point comes with all kinds of errors. You're actually not supposed to ever compare to floating point numbers for equality, you're supposed to check whether the difference between them is small.
To be fair, in most other languages, 99999999999999999999 == 7766279631452241919, or maybe even == 1661992959. No matter what language you're using, you have to be aware of when and how your results may overflow.
Also, if you do calculations using exact integer values as inputs, assuming you avoid overflow, you can directly compare floating point representations as long as you use operations that stay strictly in the integer subset (such as +, -, *, but not /).