[issue43291] elementary multiplication by 0.01 error
Raymond Hettinger
report at bugs.python.org
Sun Feb 21 20:43:34 EST 2021
Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:
Here is an explanation for the behavior you're seeing:
https://docs.python.org/3/tutorial/floatingpoint.html
Here is another famous resource on the subject:
https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html
For exact decimal arithmetic, consider using the decimal module:
https://docs.python.org/3/library/decimal.html#module-decimal
----------
nosy: +rhettinger
resolution: -> not a bug
stage: -> resolved
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43291>
_______________________________________
More information about the Python-bugs-list
mailing list