I'm beginner in Python, and I have one question.
Why does rounding a number like 5.5, 7.5, (anything).5 with odd integer part applying round(num)
work correctly (rule 5/4), but rounding number like (anything).5 with non-odd integer part by the same function returns just an integer part?
(But if we add a little number like 0.000000001 to that decimal number it works correctly)
I mean the next:
round(9.5)
returns 10, and it's correct. But
round(8.5)
returns 8, and it isn't correct. And
round(8.5 + 0.0000000000001)
returns 9.
Why it works incorrect?
I use Python 3.2.2 at Windows.