public static boolean fastExceedsPrecision(
      long fast0, long fast1, long fast2,
      int precision) {

    if (precision <= 0) {
      return true;
    } else if (precision >= HiveDecimal.MAX_PRECISION) {
      return false;
    }
    final int precisionLessOne = precision - 1;

    // 0 (lowest), 1 (middle), or 2 (high).
    int wordNum = precisionLessOne / LONGWORD_DECIMAL_DIGITS;

    int digitInWord = precisionLessOne % LONGWORD_DECIMAL_DIGITS;

    final long overLimitInWord = powerOfTenTable[digitInWord + 1] - 1;

    if (wordNum == 0) {
      if (digitInWord < LONGWORD_DECIMAL_DIGITS - 1) {
        if (fast0 > overLimitInWord) {
          return true;
        }
      }
      return (fast1 != 0 || fast2 != 0);
    } else if (wordNum == 1) {
      if (digitInWord < LONGWORD_DECIMAL_DIGITS - 1) {
        if (fast1 > overLimitInWord) {
          return true;
        }
      }
      return (fast2 != 0);
    } else {
      // We've eliminated the highest digit already with HiveDecimal.MAX_PRECISION check above.
      return (fast2 > overLimitInWord);
    }
  }
Fast decimal scale up by factor of 10.
@param fast0 word 0 of the internal representation
@param fast1 word 1
@param fast2 word 2
@param scaleUp the number of integer digits to scale up by
@param fastResult an object to reuse
@return was the operation successfule?
storage-api/src/java/org/apache/hadoop/hive/common/type/FastHiveDecimalImpl.java