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 mark.dickinson, serhiy.storchaka, steven.daprano, yudongliu
Date 2019-11-06.00:15:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1572999316.65.0.282566155421.issue38703@roundup.psfhosted.org>
In-reply-to
Content
Possibly even easier than using Decimal:

py> '%.17f' % 0.95
'0.94999999999999996'

BTW, this is a FAQ:

https://docs.python.org/3/faq/design.html#why-are-floating-point-calculations-so-inaccurate
History
Date User Action Args
2019-11-06 00:15:16steven.dapranosetrecipients: + steven.daprano, mark.dickinson, serhiy.storchaka, yudongliu
2019-11-06 00:15:16steven.dapranosetmessageid: <1572999316.65.0.282566155421.issue38703@roundup.psfhosted.org>
2019-11-06 00:15:16steven.dapranolinkissue38703 messages
2019-11-06 00:15:16steven.dapranocreate