private static boolean isRoundPortionAllZeroes(
      long fast0, long fast1, long fast2,
      int roundingPoint) {

    boolean isRoundPortionAllZeroes;
    if (roundingPoint < LONGWORD_DECIMAL_DIGITS) {

      // Lowest word gets integer rounding.

      // Factor includes scale.
      final long roundPointFactor = powerOfTenTable[roundingPoint];

      isRoundPortionAllZeroes = (fast0 % roundPointFactor == 0);

    } else if (roundingPoint < TWO_X_LONGWORD_DECIMAL_DIGITS) {

      // Middle word gets integer rounding.

      final int adjustedRoundingPoint = roundingPoint - LONGWORD_DECIMAL_DIGITS;

      if (adjustedRoundingPoint == 0) {
        isRoundPortionAllZeroes = (fast0 == 0);
      } else {

        // Factor includes scale.
        final long roundPointFactor = powerOfTenTable[adjustedRoundingPoint];

        final long roundPortion = fast1 % roundPointFactor;
        isRoundPortionAllZeroes = (fast0 == 0 && roundPortion == 0);
      }

    } else {

      // High word gets integer rounding.

      final int adjustedRoundingPoint = roundingPoint - TWO_X_LONGWORD_DECIMAL_DIGITS;

      if (adjustedRoundingPoint == 0) {
        isRoundPortionAllZeroes = (fast0 == 0 && fast1 == 0);
      } else {

        // Factor includes scale.
        final long roundPointFactor = powerOfTenTable[adjustedRoundingPoint];

        final long roundPortion = fast2 % roundPointFactor;
        isRoundPortionAllZeroes = (fast0 == 0 && fast1 == 0 && roundPortion == 0);
      }
    }
    return isRoundPortionAllZeroes;
  }
*********************************************************************************************
  // Decimal Rounding.

  public static boolean doFastRound(
      int fastSignum, long fast0, long fast1, long fast2,
      int fastIntegerDigitCount, int fastScale,
      int roundPower,
      int roundingMode,
      FastHiveDecimal fastResult) {

    if (fastSignum == 0) {

      // Zero result.
      fastResult.fastReset();
      return true;
    } else if (fastScale == roundPower) {

      // The roundPower same as scale means all zeroes below round point.

      fastResult.fastSet(fastSignum, fast0, fast1, fast2, fastIntegerDigitCount, fastScale);
      /*
      if (!fastResult.fastIsValid()) {
        fastResult.fastRaiseInvalidException();
      }
storage-api/src/java/org/apache/hadoop/hive/common/type/FastHiveDecimalImpl.java