code: private static BigDecimal createAndStripZerosToMatchScale(long compactVal, int scale, long preferredScale) {
          while (Math.abs(compactVal) >= 10L && scale > preferredScale) {
              if ((compactVal & 1L) != 0L)
                  break; // odd number cannot end in 0
              long r = compactVal % 10L;
              if (r != 0L)
                  break; // non-0 remainder
              compactVal /= 10;
              scale = checkScale(compactVal, (long) scale - 1); // could Overflow
          }
          return valueOf(compactVal, scale);
      }
docs: Remove insignificant trailing zeros from this
  {@code long} value until the preferred scale is reached or no
  more zeros can be removed.  If the preferred scale is less than
  Integer.MIN_VALUE, all the trailing zeros will be removed.
  
  @return new {@code BigDecimal} with a scale possibly reduced
  to be closed to the preferred scale.