Python Forum
Python Forum
>
Python Coding
>
General Coding Help
> Unexpected round behavior
Full Version:
Unexpected round behavior
You're currently viewing a stripped down version of our content.
View the full version
with proper formatting.
pythonCoder
Feb-19-2019, 12:50 PM
Hi, I was using IDLE and trying to do: round(9/2) -- surprised that it says 4.. round(11/2) and round(7/2) all appear correct. How can we explain this behavior? thanks..
marienbad
Feb-19-2019, 02:39 PM
See here:
https://docs.python.org/2/tutorial/float...-fp-issues
Python Forum
>
Python Coding
>
General Coding Help
> Unexpected round behavior