| 1753 | } |
| 1754 | |
| 1755 | Integer operator-(const Integer &a, const Integer& b) |
| 1756 | { |
| 1757 | Integer diff((word)0, STDMAX(a.reg.size, b.reg.size)); |
| 1758 | if (a.NotNegative()) |
| 1759 | { |
| 1760 | if (b.NotNegative()) |
| 1761 | PositiveSubtract(diff, a, b); |
| 1762 | else |
| 1763 | PositiveAdd(diff, a, b); |
| 1764 | } |
| 1765 | else |
| 1766 | { |
| 1767 | if (b.NotNegative()) |
| 1768 | { |
| 1769 | PositiveAdd(diff, a, b); |
| 1770 | diff.sign = Integer::NEGATIVE; |
| 1771 | } |
| 1772 | else |
| 1773 | PositiveSubtract(diff, b, a); |
| 1774 | } |
| 1775 | return diff; |
| 1776 | } |
| 1777 | |
| 1778 | Integer& Integer::operator-=(const Integer& t) |
| 1779 | { |
nothing calls this directly
no test coverage detected