+
+ // Get some bit facts about LHS and check for zero
+ uint32_t lhsBits = getActiveBits();
+ uint32_t lhsWords = !lhsBits ? 0 : whichWord(lhsBits - 1) + 1;
+ if (!lhsWords)
+ // 0 * X ===> 0
+ return *this;
+
+ // Get some bit facts about RHS and check for zero
+ uint32_t rhsBits = RHS.getActiveBits();
+ uint32_t rhsWords = !rhsBits ? 0 : whichWord(rhsBits - 1) + 1;
+ if (!rhsWords) {
+ // X * 0 ===> 0
+ clear();
+ return *this;
+ }
+
+ // Allocate space for the result
+ uint32_t destWords = rhsWords + lhsWords;
+ uint64_t *dest = getMemory(destWords);
+
+ // Perform the long multiply
+ mul(dest, pVal, lhsWords, RHS.pVal, rhsWords);
+
+ // Copy result back into *this
+ clear();
+ uint32_t wordsToCopy = destWords >= getNumWords() ? getNumWords() : destWords;
+ memcpy(pVal, dest, wordsToCopy * APINT_WORD_SIZE);
+
+ // delete dest array and return
+ delete[] dest;