It's true that a 32 bit floating type can't be relied upon to store a 64 bit integer. In particular, if you run the code ...
... you will find that long1 and long2 aren't always equal. You can lose significant digits, but from the right. When you assign a long to an int, for example, you can potentially chop of bits from the
left. That's why the
Java compiler complains.