private static boolean scaleDownFiveArray(int[] array, short fiveScale) {
    while (true) {
      int powerFive = Math.min(fiveScale, SqlMathUtil.MAX_POWER_FIVE_INT31);
      fiveScale -= powerFive;

      int divisor = SqlMathUtil.POWER_FIVES_INT31[powerFive];
      assert (divisor > 0);
      if (fiveScale == 0) {
        return divideCheckRound(array, divisor);
      } else {
        divideCheckRound(array, divisor);
      }
    }
  }
Scales down the given array for 5**fiveScale.

@param array
         array to scale down
@param fiveScale
         distance to scale down
@return Whether it requires incrementing if rounding
common/src/java/org/apache/hadoop/hive/common/type/UnsignedInt128.java