I remember reading that the largest prime found so far has about 13 million digits so I'm assuming there are computers that can handle such a number but how high a number can a computer hold in its memory and perform calculations with?
-
The computer does not actually handle that number, it runs a prime test over numbers of a particular form. – Simply Beautiful Art May 06 '17 at 00:34
-
2It depends on how large the ram of your computer is. You could customize how you represent/calculate integer, and let a big integer fill the whole ram you have. Say if you have a data center of 10TTB ram, then you could use all (net some head-room) to hold one number. – Jay Zha May 06 '17 at 00:35
-
Well as I understand it the primality test for prime numbers does a modulo function with the Messene prime being tested but either way I'd like to know the largest number that can be computed and handled using our current level of technology (I know it is continually improving) – Samantha Clark May 06 '17 at 00:36
-
@SamanthaClark That's not a math question. Perhaps take it to a more computer related site than this one. – Simply Beautiful Art May 06 '17 at 00:43
-
Ok, sorry, I saw that computers were something discussed here and wasn't sure what other sites I could go to – Samantha Clark May 06 '17 at 00:45
-
This is a math question, as long as we agree that computational mathematics is math. – Alex May 06 '17 at 01:08
-
@DavidK When computational mathematics allows us to learn 1 billion digits of pi, it does indirectly answer a question like this, by setting a new record. (At least this is one way to look at it.) – Alex May 06 '17 at 01:16
-
1Not mathematics-related. Go to CS. – Parcly Taxel May 06 '17 at 01:20
-
Hey folks! Comments are not the place for discussing whether or not a question is appropriate for the site! Take it to chat, or meta, or vote to close. – Eric Stucky May 06 '17 at 01:23
3 Answers
It depends on what you mean by hold in memory and perform calculations. It is easy to use (almost) half the memory of a computer to store one number in binary, use (almost) the other half to store another and add them. The Titan supercomputer has about $2^{49}$ bytes of memory or $2^{52}$ bits. You can then store two numbers of size $2^{2^{51}}$ and add them together.
Of course, we can represent much larger numbers symbolically and operate with them in specific ways. I can just write $2^{2^{1000}} \cdot 2^{2^{1000}}=2^{2^{1001}}$ The previous approach could handle any number of that size. There are many notations for handling large numbers, but they can only handle special numbers of this size. $2^{2^{1000}}$ is a huge number and there is no way to talk about most of the numbers of that size, only ones that have nice representations.
- 374,822
The largest number depends upon the computer and operating system, and through software tricks can be made quite large. 13 million digits seems fairly small. My Mac desktop machine running Mathematica has a maximum machine number of: $1.79769 \cdot 10^{308}$. Again, there are many tricks for increasing this number, if required.
- 29,774
-
According to this calculation here: https://www.wolframalpha.com/input/?i=log+base+2(1.79769%E2%8B%8510%5E308), it seems that the maximum number allowed by your Mac is $2^{1024}$. – Toby Mak May 06 '17 at 00:42
-
Ok, thank you ^-^ Do you also happen to know what program's exist that could utilize so much memory in a computer? I know from working with eclipse (java) that it only allows the number to reach about 10 digits long before the value is "out of range" – Samantha Clark May 06 '17 at 00:43
-
According to Stack Exchange, (http://stackoverflow.com/questions/9860588/maximum-value-for-long-integer), it seems that Python has no predefined maximum integer limit. – Toby Mak May 06 '17 at 00:45
-
It takes minuscule memory to store this number... a mere 1024 bits (which costs $7.04 \times 10^{-7}$ cents) on a standard hard disk. Absolutely minuscule. The thumbnail image accompanying my answer is order of magnitudes larger. – David G. Stork May 06 '17 at 00:48
Apart from the amount of available memory and other characteristics of your computer, a lot also depends on the meaning of "handle": What exactly do we want to do?
Examples:
(1) If we want to perform primality testing, then millions of decimal digits is the current maximum (in "best" cases!).
(2) However, if we want to find prime factors of a number, then even 500 digits is already way too many. No computer can "handle" that in a reasonable time if we are faced with a worst-case scenario (factoring a semiprime with two roughly equal prime factors).
(3) On the other hand, if we mostly want to perform the four arithmetic operations, then in some scenarios computers can handle billions of digits; see e.g. One billion digits of pi.
All of the above assumed that "computer" is hardware + software. Indeed, we need a software implementation of arbitrary precision arithmetic for tasks like the above.
If, however, we restrict the meaning of "computer can handle" to hardware only, then we are usually left with about 15-30 significant decimal digits, depending on hardware type. (See Extended precision in Wikipedia.)
- 4,873