Issue 6794: decimal.py: incorrect results in NaN comparisons (original) (raw)

Issue6794

Created on 2009-08-28 10:15 by skrah, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg92032 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2009-08-28 10:15
Hi, I believe the following comparisons aren't correct: 1: Decimal("-sNaN63450748854172416").compare_total(Decimal("-sNaN911993")) ==> Decimal('1') Should be: Decimal('-1') (checked against decNumber) 2: Decimal("NaN1222222222222").compare_total_mag(Decimal("-NaN999999")) ==> Decimal('-1') Should be: Decimal('1') (checked against decNumber)
msg92036 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2009-08-28 13:44
Thanks for the report! I've applied a quick fix in the trunk in r74564; merged to other branches in r74565 (release26-maint), r74566 (py3k) and r74567 (release31-maint).
History
Date User Action Args
2022-04-11 14:56:52 admin set github: 51043
2009-08-28 13:44:57 mark.dickinson set status: open -> closedresolution: fixedmessages: + stage: resolved
2009-08-28 11:24:14 mark.dickinson set assignee: mark.dickinsonversions: + Python 2.6, Python 3.1, Python 2.7, Python 3.2
2009-08-28 10🔞20 ezio.melotti set priority: normalnosy: + mark.dickinsontype: behavior
2009-08-28 10:15:03 skrah create