[New-bugs-announce] [issue46467] Rounding 5, 50, 500 behaves differently depending on preceding value

Adam Ulrich report at bugs.python.org
Fri Jan 21 21:36:11 EST 2022


New submission from Adam Ulrich <adam.ulrich at gmail.com>:

round(250,-2) returns 200
round(350,-2) returns 400
round(450,-2) returns 400
round(550,-2) returns 600
round(5,-1) returns 0
round(15,-1) returns 20
round(500,-3) returns 0
round(1500,-3) returns 2000

expected: round of 5 to consistently rounds up.

----------
components: Interpreter Core
messages: 411222
nosy: adam.ulrich
priority: normal
severity: normal
status: open
title: Rounding 5,50,500 behaves differently depending on preceding value
type: behavior
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46467>
_______________________________________


More information about the New-bugs-announce mailing list