[issue44595] round() gives wrong result

2021-07-09 Thread Steven D'Aprano
Steven D'Aprano added the comment: Not a bug, the result is correct. Python floats are binary floating point values, not decimal. 0.3368655's actual value is exactly: 0.3368654984392928809029399417340755462646484375 so when rounding to six decimal places, the seventh decimal place i

[issue44595] round() gives wrong result

2021-07-09 Thread Vedran Čačić
Vedran Čačić added the comment: Have you seen the Note at https://docs.python.org/3/library/functions.html?highlight=Note#round? -- nosy: +veky ___ Python tracker ___

[issue44595] round() gives wrong result

2021-07-09 Thread Jos Dechamps
New submission from Jos Dechamps : round(0.3368655,6) returns 0.336865 instead of 0.336866 -- messages: 397238 nosy: dechamps priority: normal severity: normal status: open title: round() gives wrong result type: behavior ___ Python tracker