diff options
Diffstat (limited to 'Lib/decimal.py')
-rw-r--r-- | Lib/decimal.py | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/Lib/decimal.py b/Lib/decimal.py index 7fb9c7b..83ca020 100644 --- a/Lib/decimal.py +++ b/Lib/decimal.py @@ -2651,10 +2651,10 @@ class Decimal(_numbers.Real): sn = self._isnan() on = other._isnan() if sn or on: - if on == 1 and sn != 2: - return self._fix_nan(context) - if sn == 1 and on != 2: - return other._fix_nan(context) + if on == 1 and sn == 0: + return self._fix(context) + if sn == 1 and on == 0: + return other._fix(context) return self._check_nans(other, context) c = self._cmp(other) @@ -2693,10 +2693,10 @@ class Decimal(_numbers.Real): sn = self._isnan() on = other._isnan() if sn or on: - if on == 1 and sn != 2: - return self._fix_nan(context) - if sn == 1 and on != 2: - return other._fix_nan(context) + if on == 1 and sn == 0: + return self._fix(context) + if sn == 1 and on == 0: + return other._fix(context) return self._check_nans(other, context) c = self._cmp(other) @@ -3251,10 +3251,10 @@ class Decimal(_numbers.Real): sn = self._isnan() on = other._isnan() if sn or on: - if on == 1 and sn != 2: - return self._fix_nan(context) - if sn == 1 and on != 2: - return other._fix_nan(context) + if on == 1 and sn == 0: + return self._fix(context) + if sn == 1 and on == 0: + return other._fix(context) return self._check_nans(other, context) c = self.copy_abs()._cmp(other.copy_abs()) @@ -3281,10 +3281,10 @@ class Decimal(_numbers.Real): sn = self._isnan() on = other._isnan() if sn or on: - if on == 1 and sn != 2: - return self._fix_nan(context) - if sn == 1 and on != 2: - return other._fix_nan(context) + if on == 1 and sn == 0: + return self._fix(context) + if sn == 1 and on == 0: + return other._fix(context) return self._check_nans(other, context) c = self.copy_abs()._cmp(other.copy_abs()) |