>>> round(14.5)
14
>>> round(29.5)
30
Yes, I understand that:
Note The behavior of round() for floats can be surprising: for example, round(2.675, 2) gives 2.67 instead of the expected 2.68. This is not a bug: it’s a result of the fact that most decimal fractions can’t be represented exactly as a float. See Floating Point Arithmetic: Issues and Limitations for more information.
But how we can use function with "surprising behavior"?
What we can do for fixing this problem with floating numbers?