[issue45263] round displays 2 instead of 3 digits

Kenneth Fossen report at bugs.python.org
Wed Sep 22 05:51:41 EDT 2021


New submission from Kenneth Fossen <fossen.kenneth at gmail.com>:

When round is given 3 as argument for number of decimal points, the expected behaviour is to return a digit with 3 decimal points

Example:

ig1 = 0.4199730940219749
ig2 = 0.4189730940219749
print(round(ig1, 3)) # 0.42 expected  to be 0.420
print(round(ig2, 3)) # 0.419

----------
messages: 402413
nosy: kenfos
priority: normal
severity: normal
status: open
title: round displays 2 instead of 3 digits
type: behavior
versions: Python 3.9

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


More information about the Python-bugs-list mailing list