public static byte differenceScaleTen(UnsignedInt128 left,
      UnsignedInt128 right, UnsignedInt128 result, short tenScale) {
    if (tenScale == 0) {
      return difference(left, right, result);
    }

    // scale up/down
    int[] r = right.v.clone();
    if (tenScale < 0) {
      // scale down
      scaleDownTenArray4RoundUp(r, (short) -tenScale);
    } else {
      // scale up
      boolean overflow = scaleUpTenArray(r, tenScale);
      if (overflow) {
        SqlMathUtil.throwOverflowException();
      }
    }

    return differenceInternal(left, r, result);
  }
Calculates absolute difference of left and right operator after ten-based
scaling on right.
<code>result := abs (left - (right * 10**tenScale))</code> This is the core
implementation of subtract.

@param left
         left operand
@param right
         right operand
@param result
         the object to receive the result. can be same object as left or
         right.
@param tenScale
         number of ten-based scaling. could be either positive or negative.
@return signum of the result. -1 if left was smaller than right, 1 if
        larger, 0 if same (result is zero).
common/src/java/org/apache/hadoop/hive/common/type/UnsignedInt128.java