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 remi.lapeyre
Recipients ahmad dana, remi.lapeyre
Date 2020-04-06.15:22:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1586186575.31.0.470434133988.issue40206@roundup.psfhosted.org>
In-reply-to
Content
Hi ahmad, calculation with floating points in Python uses the IEE 754 (https://fr.wikipedia.org/wiki/IEEE_754) standard and will result in such quirks.

If you want to not loose precision you can use the decimal module:

>>> from decimal import Decimal
>>> Decimal('4.6')*100
Decimal('460.0')

Since this is not a bug if you have other questions when working with floats, try to ask on python-list or a forum.
History
Date User Action Args
2020-04-06 15:22:55remi.lapeyresetrecipients: + remi.lapeyre, ahmad dana
2020-04-06 15:22:55remi.lapeyresetmessageid: <1586186575.31.0.470434133988.issue40206@roundup.psfhosted.org>
2020-04-06 15:22:55remi.lapeyrelinkissue40206 messages
2020-04-06 15:22:55remi.lapeyrecreate