Compares the values numerically with their sign ignored. >>> ExtendedContext.min_mag(Decimal('3'), Decimal('-2')) Decimal('-2') >>> ExtendedContext.min_mag(Decimal('-3'), Decimal('NaN')) Decimal('-3') >>> ExtendedContext.min_mag(1, -2) Decimal('1')
(self, a, b)
| 4888 | return a.min(b, context=self) |
| 4889 | |
| 4890 | def min_mag(self, a, b): |
| 4891 | """Compares the values numerically with their sign ignored. |
| 4892 | |
| 4893 | >>> ExtendedContext.min_mag(Decimal('3'), Decimal('-2')) |
| 4894 | Decimal('-2') |
| 4895 | >>> ExtendedContext.min_mag(Decimal('-3'), Decimal('NaN')) |
| 4896 | Decimal('-3') |
| 4897 | >>> ExtendedContext.min_mag(1, -2) |
| 4898 | Decimal('1') |
| 4899 | >>> ExtendedContext.min_mag(Decimal(1), -2) |
| 4900 | Decimal('1') |
| 4901 | >>> ExtendedContext.min_mag(1, Decimal(-2)) |
| 4902 | Decimal('1') |
| 4903 | """ |
| 4904 | a = _convert_other(a, raiseit=True) |
| 4905 | return a.min_mag(b, context=self) |
| 4906 | |
| 4907 | def minus(self, a): |
| 4908 | """Minus corresponds to unary prefix minus in Python. |