What is the best method to find the number of digits of a positive integer?
I have found this 3 basic methods:
conversion to string
log(x,n)-mod(log(x,n),1)+1
Where x is a the base and n is the number.