IntegerLength

WMA link


IntegerLength[x]

gives the number of digits in the base-10 representation of x.

IntegerLength[x, b]

gives the number of base-b digits in x.

IntegerLength with base 2:

Check that IntegerLength is correct for the first 100 powers of 10:

The base must be greater than 1:

0 is a special case:

IntegerExponent
$MachineEpsilon