Rémi Lapeyre <remi.lape...@henki.fr> added the comment: 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. ---------- nosy: +remi.lapeyre _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40206> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com