public void multiplyDestructiveNativeDecimal128(Decimal128 right, short newScale) {
    if (this.signum == 0 || right.signum == 0) {
      this.zeroClear();
      this.scale = newScale;
      return;
    }

    // this = this.mag / 10**this.scale
    // right = right.mag / 10**right.scale
    // this * right = this.mag * right.mag / 10**(this.scale + right.scale)
    // so, we need to scale down (this.scale + right.scale - newScale)
    short currentTotalScale = (short) (this.scale + right.scale);
    short scaleBack = (short) (currentTotalScale - newScale);

    if (scaleBack > 0) {

      // we do the scaling down _during_ multiplication to avoid
      // unnecessary overflow.
      // note that even this could overflow if newScale is too small.
      this.unscaledValue.multiplyScaleDownTenDestructive(right.unscaledValue,
          scaleBack);
    } else {

      // in this case, we are actually scaling up.
      // we don't have to do complicated things because doing scaling-up
      // after
      // multiplication doesn't affect overflow (it doesn't happen or
      // happens anyways).
      this.unscaledValue.multiplyDestructive(right.unscaledValue);
      this.unscaledValue.scaleUpTenDestructive((short) -scaleBack);
    }

    this.scale = newScale;
    this.signum = (byte) (this.signum * right.signum);
    if (this.unscaledValue.isZero()) {
      this.signum = 0; // because of scaling down, this could happen
    }
    this.unscaledValue.throwIfExceedsTenToThirtyEight();
  }
As of 2/11/2014 this has a known bug in multiplication. See
TestDecimal128.testKnownPriorErrors(). Keeping this source
code available since eventually it is better to fix this.
The fix employed now is to replace this code with code that
uses Java BigDecimal multiply.

Performs multiplication, changing the scale of this object to the specified
value.

@param right
         right operand. this object is not modified.
@param newScale
         scale of the result. must be 0 or positive.
common/src/java/org/apache/hadoop/hive/common/type/Decimal128.java