Fewest radix-10 digits needed to hold any given radix-2 number

Was trying to work out a function to map the size, in base-2 bits of a number, to the minimum number of base-10 digits needed to represent the number (and to useful: if the function has an error th…