public static int digitCount(final int value)
    {
        return (int)((value + INT_DIGITS[31 - Integer.numberOfLeadingZeros(value | 1)]) >> 32);
    }
@Test
    void digitCountLongValue()
    {
        for (int i = 0; i < LONG_MAX_DIGITS; i++)
        {
            final long min = 0 == i ? 0 : LONG_POW_10[i];
            final long max = LONG_MAX_DIGITS - 1 == i ? Long.MAX_VALUE : LONG_POW_10[i + 1] - 1;
            final int expectedDigitCount = i + 1;
            assertEquals(expectedDigitCount, digitCount(min));
            assertEquals(expectedDigitCount, digitCount(min + 1));
            assertEquals(expectedDigitCount, digitCount(min + (max - min) >>> 1));
            assertEquals(expectedDigitCount, digitCount(max - 1));
            assertEquals(expectedDigitCount, digitCount(max));
        }
    }