Calculation of Number of Digits

The number of digits can be calculated using the following method:

Any number can be expressed as a power of 10 (ie. 10^x). The value of x here is a 'real' number. The integer part of this number is equal to one less than the number of digits in the number in question. So, the equation

	13^n = 10^x

can be used to find the number of digits in 13^n. The n is power of 13 to be calculated. Taking the log (base10) of both sides of the above formula gives:

        n log(13) = x log(10)
So, the equation for the number of digits is then:

        x = (n log(13)) + 1

with the part after the decimal point removed. (Note that log(10) is simply equal to 1.)

An example:

Number of digits in 13^13:

        x = (n log(13)) + 1
        x = (13 log(13)) + 1
        x = (13 * 1.113943352) + 1
        x = (14) + 1
        x = 15