Google: "what every computer scientist should know about floating point arithmetic".

The gist: computers have trouble representing exact decimals in binary. You're seeing the expected behavior.