public static int doFastToFormatBytes(
      int fastSignum, long fast0, long fast1, long fast2,
      int fastIntegerDigitCount, int fastScale,
      int formatScale,
      byte[] scratchBuffer) {

    // NOTE: OldHiveDecimal.toFormatString returns decimal strings with more than > 38 digits!

    if (formatScale >= fastScale) {
      return
          doFastToBytes(
              fastSignum, fast0, fast1, fast2,
              fastIntegerDigitCount, fastScale, formatScale,
              scratchBuffer);
    } else {
      FastHiveDecimal fastTemp = new FastHiveDecimal();
      if (!fastRound(
          fastSignum, fast0, fast1, fast2,
          fastIntegerDigitCount, fastScale,
          formatScale, BigDecimal.ROUND_HALF_UP,
          fastTemp)) {
        return 0;
      }
      return
          doFastToBytes(
              fastTemp.fastSignum, fastTemp.fast0, fastTemp.fast1, fastTemp.fast2,
              fastTemp.fastIntegerDigitCount, fastTemp.fastScale, formatScale,
              scratchBuffer);
    }
  }
*********************************************************************************************
  // Decimal Division / Remainder.

  /**
EXPERMIMENTAL: Division when divisor fits in a single decimal longword.

@return  remainderSubexpr2
storage-api/src/java/org/apache/hadoop/hive/common/type/FastHiveDecimalImpl.java