finding out total digits in a large number

70 Views Asked by At

Is there any easy way to find out how many digits does the number $12^{400}$ have or such types of problems like how many digits the number $x^y$ have? ($x$ and $y$ are variables)

2

There are 2 best solutions below

0
On

If $x$ and $y$ aren’t too awfully large, you can simply calculate $\log_{10}x^y=y\log_{10}x$. For example,

$$\log_{10}12^{400}=400\log_{10}12\approx431.6725\;,$$

which tells you that the number has $431+1=432$ digits in base ten.

3
On

In general, you can calculate the number of digits in an arbitrary base $n$ of an expression $a^b$ by the formula $$D = \lfloor 1 + \log_{n}(a^b)\rfloor = \lfloor 1 + (b)\log_{n}(a)\rfloor$$ where $D$ represents the number of digits in your result.