// then call one of BigUnsigned's put-heres.
// See remarks about aliased calls in BigUnsigned.cc .
-#define DOTR_ALIASED(cond, op) \
+#define DTRT_ALIASED(cond, op) \
if (cond) { \
BigInteger tmpThis; \
tmpThis.op; \
// Addition
void BigInteger::add(const BigInteger &a, const BigInteger &b) {
- DOTR_ALIASED(this == &a || this == &b, add(a, b));
+ DTRT_ALIASED(this == &a || this == &b, add(a, b));
// If one argument is zero, copy the other.
if (a.sign == zero)
operator =(b);
void BigInteger::subtract(const BigInteger &a, const BigInteger &b) {
// Notice that this routine is identical to BigInteger::add,
// if one replaces b.sign by its opposite.
- DOTR_ALIASED(this == &a || this == &b, subtract(a, b));
+ DTRT_ALIASED(this == &a || this == &b, subtract(a, b));
// If a is zero, copy b and flip its sign. If b is zero, copy a.
if (a.sign == zero) {
BigUnsigned::operator =(b);
// Multiplication
void BigInteger::multiply(const BigInteger &a, const BigInteger &b) {
- DOTR_ALIASED(this == &a || this == &b, multiply(a, b));
+ DTRT_ALIASED(this == &a || this == &b, multiply(a, b));
// If one object is zero, copy zero and return.
if (a.sign == zero || b.sign == zero) {
sign = zero;
// Negation
void BigInteger::negate(const BigInteger &a) {
- DOTR_ALIASED(this == &a, negate(a));
+ DTRT_ALIASED(this == &a, negate(a));
// Copy a's magnitude
BigUnsigned::operator =(a);
// Copy the opposite of a.sign