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?


closed as off-topic by user21820, A.P., achille hui, Mike Pierce, colormegone Jun 29 '15 at 2:03

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question is not about mathematics, within the scope defined in the help center." – user21820, A.P., achille hui, Mike Pierce, colormegone
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    $\begingroup$ youtu.be/eB5VXJXxnNU?t=53 $\endgroup$ – Git Gud Jun 28 '15 at 9:24
  • $\begingroup$ This is not a power of natural number it's just an infinite number of 9s. $\endgroup$ – parkhyeyoo Jun 28 '15 at 9:25
  • $\begingroup$ Oh!${{{{{}}}}}$ $\endgroup$ – Git Gud Jun 28 '15 at 9:27
  • $\begingroup$ But, in base $10$, a power of $10$ is an 1 followed by a sequence of 0s. 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'); $\endgroup$ – celtschk Jun 28 '15 at 9:35
  • $\begingroup$ It takes about 42GB to represent $7^{120,000,000,000}$ in computer. Since we have PC with ram of order $\sim 200$GB these days, I don't see any problem to compute such a number on a high-end PC. $\endgroup$ – achille hui Jun 28 '15 at 9:38

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.

  • $\begingroup$ But if we take an even larger power then perhaps all computers on the planet won't be able to store its digits. $\endgroup$ – parkhyeyoo Jun 28 '15 at 9:38
  • $\begingroup$ 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. $\endgroup$ – MJD Jun 28 '15 at 9:42

Not the answer you're looking for? Browse other questions tagged or ask your own question.