Python is being weird. Am I missing something?

Indeed floating point issues, from that floating point topic I love this:

Whenever you’re using floating point numbers (single or double precision, doesn’t matter), you can’t ever be sure a number you give to the computer can be properly represented by the computer.

3 Likes