public static void fastRoundFractionalDown(
      int fastSignum, long fast0, long fast1, long fast2,
      int scaleDown,
      FastHiveDecimal fastResult) {
    if (scaleDown < 1 || scaleDown > HiveDecimal.MAX_SCALE) {
      throw new IllegalArgumentException("Expecting scaleDown > 0 and scaleDown < 38 (scaleDown " + scaleDown + ")");
    }

    if (scaleDown == HiveDecimal.MAX_SCALE) {

      // Complete fractional digits shear off.  Zero result.
      fastResult.fastReset();
      return;
    }

    doFastScaleDown(
        fast0, fast1, fast2,
        scaleDown,
        fastResult);

    if (fastResult.fast0 == 0 && fastResult.fast1 == 0 && fastResult.fast2 == 0) {
      fastResult.fastSignum = 0;
      fastResult.fastIntegerDigitCount = 0;
      fastResult.fastScale = 0;
    } else {
      fastResult.fastSignum = fastSignum;
    }
  }
Fast decimal scale down by factor of 10 with rounding ROUND_DOWN.

The fraction being scaled away is thrown away.

@param fastSignum the sign (-1, 0, or +1)
@param fast0 word 0 of the internal representation
@param fast1 word 1
@param fast2 word 2
@param scaleDown the number of integer digits to scale
@param fastResult an object to reuse
storage-api/src/java/org/apache/hadoop/hive/common/type/FastHiveDecimalImpl.java