private static int divideMultiPrecision(int[] inOut, int divisor) {
    long divisorUnsigned = divisor & SqlMathUtil.LONG_MASK;
    long quotient;
    long remainder = 0;
    for (int i = inOut.length - 1; i >= 0; --i) {
      remainder = (inOut[i] & SqlMathUtil.LONG_MASK) + (remainder << 32);
      quotient = remainder / divisorUnsigned;
      inOut[i] = (int) quotient;
      remainder %= divisorUnsigned;
    }
    return (int) remainder;
  }
Multi-precision one super-digit divide in place.

@param inOut
@param divisor
@return
common/src/java/org/apache/hadoop/hive/common/type/SqlMathUtil.java