Which is the largest power of natural number that can be evaluated by computers? For example if we take a very large power of 7: $7^{120000000000}$. Can a computer calculate this number?
1 Answers
That number will not be a problem. Using elementary methods, we estimate that it will have around 101 billion digits. It's easy to store 2 digits in a byte, so we can guess that the final result will occupy about 50 GB. Most computers don't have so much memory, but 50 GB is not an unusually large disk file and the intermediate results can be stored on the disk.
The calculation requires relatively few operations. If we had $x_0 = 7^{29296875}$ we could then calculate $x_1 = x_0^2, x_2 = x_1^2, \ldots$, and then $x_{12}$ would be the answer we seek.
But we can get $x_0 = 7^{29296875}$ by first calculating $y = 7^{5859375}$, then $y' = y^2, x_0 = y'\cdot y'\cdot 7$. Done in this fashion the entire calculation of $7^{120000000000}$ requires only around 45 multiplications, of which about half are easy and half are more difficult. The difficult multiplications can be done using Fourier transform methods; the schoolbook algorithm is too slow for numbers this large.
- 65,394
- 39
- 298
- 580
-
But if we take an even larger power then perhaps all computers on the planet won't be able to store its digits. – parkhyeyoo Jun 28 '15 at 09:38
-
True. For example, we can say that it is probably quite impossible to calculate $7^{10^{100}}$ since all the computers in the universe won't be able to store its digits. – MJD Jun 28 '15 at 09:42
1followed by a sequence of0s. So one could argue that the highest power of ten the following code can calculate is limited only by the time until the program is stopped or the computer or the output fails:putchar('1'); while(1) putchar('0');– celtschk Jun 28 '15 at 09:35