public static int fastSqlPrecision(
      int fastSignum, long fast0, long fast1, long fast2,
      int fastIntegerDigitCount, int fastScale) {

    if (fastSignum == 0) {
      return 1;
    }

    final int rawPrecision =
        fastRawPrecision(fastSignum, fast0, fast1, fast2);

    if (rawPrecision < fastScale) {
      // This can happen for numbers less than 0.1
      // For 0.001234: rawPrecision=4, scale=6
      // In this case, we'll set the type to have the same precision as the scale.
      return fastScale;
    }
    return rawPrecision;
  }
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