| 3536 | } |
| 3537 | |
| 3538 | Integer Integer::Plus(const Integer& b) const |
| 3539 | { |
| 3540 | Integer sum((word)0, STDMAX2(reg.size(), b.reg.size())); |
| 3541 | if (NotNegative()) |
| 3542 | { |
| 3543 | if (b.NotNegative()) |
| 3544 | PositiveAdd(sum, *this, b); |
| 3545 | else |
| 3546 | PositiveSubtract(sum, *this, b); |
| 3547 | } |
| 3548 | else |
| 3549 | { |
| 3550 | if (b.NotNegative()) |
| 3551 | PositiveSubtract(sum, b, *this); |
| 3552 | else |
| 3553 | { |
| 3554 | PositiveAdd(sum, *this, b); |
| 3555 | sum.sign = Integer::NEGATIVE; |
| 3556 | } |
| 3557 | } |
| 3558 | return sum; |
| 3559 | } |
| 3560 | |
| 3561 | Integer& Integer::operator+=(const Integer& t) |
| 3562 | { |
no test coverage detected