You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bpo-2531: float compared to decimal is silently incorrect.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2009-11-14.22:20:49.225>created_at=<Date2009-11-14.18:39:19.397>labels= ['type-bug', 'library']
title='decimal.Decimal greater than/less than sometimes gives wrong answers when comparing to floats.'updated_at=<Date2009-11-14.22:39:16.972>user='https://bugs.python.org/adamtj'
Unfortunately there's no easy way to fix this in 2.x, where any object is
supposed to be comparable with any other. See bpo-2531 for a previous
discussion. It's fixed in 3.x: there a comparison (other than ==, !=)
between a float and a Decimal does raise an exception.
Closing as a duplicate of bpo-2531. bpo-2531 is also closed, but you
should feel free to add to the discussion there.
I've re-opened bpo-2531: some recent changes (in particular, the
backport of the 3.x float <-> string conversions to 2.x) may make
previously rejected solutions viable again.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: