How many digits are there in 2^1000 (2 to the power of 1000)?
(In reply to check this out
Except that the answer is 302 digits--not 301. The technique of "for every increase of 10 powers resultant answer increases by 3 digits" actually is assuming that 2^10 = 1000. It does not. It equals 1024. Thus 1K of memory has 1024 bytes. 1 Meg has 1,048,576. Eventually the excess leads to an extra digit, and this happens every so often. For example, 2^93 has 28 digits, but 2^103 has 32; 2^186 has 56 digits, but 2^196 has 60. Referring back to the log(2) method previously posted, the number of digits in 2^n is one more than the integer part of n*log(2). The method used by akila assumes that log(2) = .3, when in fact it is .3010299956639811.
P.S. Anecdote: an approximation of log(2) became imbedded in my head many years ago when an entrance to Columbia University as 3010 Broadway had its street address preceded by a graffito "log(2) = ."
Posted by Charlie
on 2003-03-02 10:52:57