Unexpected integer/float math behavior in Python