public static int fastHighWordTrailingZeroCount(
      long longWord) {

    if (longWord == 0) {
      return HIGHWORD_DECIMAL_DIGITS;
    }

    long factor = 10;
    for (int i = 0; i < HIGHWORD_DECIMAL_DIGITS; i++) {
      if (longWord % factor != 0) {
        return i;
      }
      factor *= 10;
    }
    return 0;
  }
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