Steven D'Aprano <[email protected]> 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.336865499999999984392928809029399417340755462646484375 so when rounding to six decimal places, the seventh decimal place is a four, not five, and it rounds down to 0.336865. To be precise, it rounds down to: 0.336865000000000025526247782181599177420139312744140625 ---------- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <[email protected]> <https://bugs.python.org/issue44595> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
