[issue43903] round() produces incorrect results with certain values

2021-04-21 Thread Steven D'Aprano
Steven D'Aprano added the comment: I concur with Eric that this should be closed. They're not "incorrect results", they are correct results, or at least *better* results. We did not invent the so-called Banker's Rounding technique, it has been the standard used by the American Society for Te

[issue43903] round() produces incorrect results with certain values

2021-04-21 Thread Eric V. Smith
Eric V. Smith added the comment: I agree this is working as designed and documented, so I'm closing this. Olli: You might want to read https://en.wikipedia.org/wiki/Rounding#Round_half_to_even -- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed

[issue43903] round() produces incorrect results with certain values

2021-04-21 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue43903] round() produces incorrect results with certain values

2021-04-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is correct because it works as documented. Please read the documentation carefully. It was intentional change in Python 3. See https://docs.python.org/3/whatsnew/3.0.html#builtins. -- ___ Python tracker

[issue43903] round() produces incorrect results with certain values

2021-04-21 Thread Olli
Olli added the comment: Just because incorrect results are documented, that doesn't mean the current implementation could not be improved. More over, Python 2.7.16 on the same machine produces expected results: Python 2.7.16 (default, Dec 21 2020, 23:00:36) [GCC Apple LLVM 12.0.0 (clang-12

[issue43903] round() produces incorrect results with certain values

2021-04-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It all works as documented. https://docs.python.org/3/library/functions.html#round -- nosy: +serhiy.storchaka ___ Python tracker ___ _

[issue43903] round() produces incorrect results with certain values

2021-04-21 Thread Olli
New submission from Olli : When rounding numbers with round(), middle values at with even base number are rounded in wrong direction. Python 3.9.1 (default, Feb 3 2021, 07:38:02) [Clang 12.0.0 (clang-1200.0.32.29)] on darwin MacBook Pro (13-inch, 2017, Two Thunderbolt 3 ports) macOS 11.2.3