This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steven.daprano
Recipients steven.daprano, ungedummt
Date 2020-10-03.12:04:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1601726674.23.0.799944204492.issue41920@roundup.psfhosted.org>
In-reply-to
Content
Please forgive me if my answer is a little bit brusque, but we get essentially this same bug report regularly, only the numbers are different.

This is not a bug in Python, it is an unavoidable consequence of how floating point arithmetic works in every single programming language that does floating point arithmetic.

There's a FAQ about it:

https://docs.python.org/3/faq/design.html#why-am-i-getting-strange-results-with-simple-arithmetic-operations

it's discussed in the tutorial:

https://docs.python.org/3/tutorial/floatingpoint.html#tut-fp-issues

there's probably a million websites, blog posts, Stackoverflow questions etc about it, and computer scientists write papers about it:

https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html
History
Date User Action Args
2020-10-03 12:04:34steven.dapranosetrecipients: + steven.daprano, ungedummt
2020-10-03 12:04:34steven.dapranosetmessageid: <1601726674.23.0.799944204492.issue41920@roundup.psfhosted.org>
2020-10-03 12:04:34steven.dapranolinkissue41920 messages
2020-10-03 12:04:34steven.dapranocreate