DAGDA SEARCH | Back to results | Support

Message 370255 - Python tracker

Source: https://bugs.python.org/msg370255

homepage

Message370255 ➜

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 serhiy.storchaka
Recipients mark.dickinson, serhiy.storchaka, zach.ware
Date 2020-05-28.17:27:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1590686876.93.0.758851621751.issue40801@roundup.psfhosted.org>
In-reply-to
Content
The problem with the roundtrip PyFloat_FromDouble(PyFloat_AsDouble(obj)) is that (in contrary to PyNumber_Index()) it is lossy. Converting Decimal, Fraction, float128 to float before using it in expression can lead to loss of precision.

So such conversion looks to me less useful than operator.index().
History
Date User Action Args
2020-05-28 17:27:56serhiy.storchakasetrecipients: + serhiy.storchaka, mark.dickinson, zach.ware
2020-05-28 17:27:56serhiy.storchakasetmessageid: <1590686876.93.0.758851621751.issue40801@roundup.psfhosted.org>
2020-05-28 17:27:56serhiy.storchakalinkissue40801 messages
2020-05-28 17:27:56serhiy.storchakacreate
Supported by The Python Software Foundation,
Powered by Roundup Copyright © 1990-2022, Python Software Foundation
Legal Statements