|
@@ -75,7 +75,7 @@ biginteger & math::operator+=(biginteger & rhs, biginteger const & lhs) {
|
|
|
biginteger & math::operator-=(biginteger & rhs, biginteger const & lhs) {
|
|
biginteger & math::operator-=(biginteger & rhs, biginteger const & lhs) {
|
|
|
if (lhs == biginteger::ZERO) { return rhs; }
|
|
if (lhs == biginteger::ZERO) { return rhs; }
|
|
|
else if (rhs == biginteger::ZERO) { rhs = -lhs; }
|
|
else if (rhs == biginteger::ZERO) { rhs = -lhs; }
|
|
|
- if (rhs.is_negative != lhs.is_negative) {
|
|
|
|
|
|
|
+ else if (rhs.is_negative != lhs.is_negative) {
|
|
|
detail::add(rhs.data, lhs.data);
|
|
detail::add(rhs.data, lhs.data);
|
|
|
} else {
|
|
} else {
|
|
|
rhs.subtract_impl(lhs, true);
|
|
rhs.subtract_impl(lhs, true);
|