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 johnmish.iam
Recipients johnmish.iam
Date 2021-04-19.11:48:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1618832903.3.0.808077811631.issue43887@roundup.psfhosted.org>
In-reply-to
Content
A1
>>> sorted([12.000000000000001, 2, 1.999, 2.1, 4, 12])
[1.999, 2, 2.1, 4, 12, 12.000000000000002]
A2
>>> sorted([12.0000000000000001, 2, 1.999, 2.1, 4, 12])
[1.999, 2, 2.1, 4, 12.0, 12]
B1
>>> sorted([11.999999999999999, 2, 1.999, 2.1, 4, 12])
[1.999, 2, 2.1, 4, 11.999999999999998, 12]
B2
>>> sorted([11.9999999999999999, 2, 1.999, 2.1, 4, 12])
[1.999, 2, 2.1, 4, 12.0, 12]

Hello,

In A2 and in B2 we see the same output for 2 not equal expected values.

It seems to be that floats are always first in list.

So, what about trying to "store" if some float is 12 "in limit" of 12 but from "left/-"? So then it is < than 12.

12.000000000000000000000000000001 would be then 12 but in upper limit, right/+ so > 12

What do You think?

Best regards.

PS ofc I could use decimal, but if it shouldn't work, why it does not raise exception and ask for forgiveness... ?
History
Date User Action Args
2021-04-19 11:48:23johnmish.iamsetrecipients: + johnmish.iam
2021-04-19 11:48:23johnmish.iamsetmessageid: <1618832903.3.0.808077811631.issue43887@roundup.psfhosted.org>
2021-04-19 11:48:23johnmish.iamlinkissue43887 messages
2021-04-19 11:48:23johnmish.iamcreate