Whats the best software to calculate very large numbers?

Click For Summary

Discussion Overview

The discussion revolves around the best software and methods for calculating very large numbers, particularly in the context of prime number calculations. Participants explore various software options, programming languages, and algorithms relevant to handling large numerical computations.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • Some participants mention the largest known prime number, which has nearly 13 million decimal digits, questioning the capability of "normal" computers to calculate such numbers.
  • One participant identifies the largest known prime as the Mersenne prime 2^43112609 - 1, stating that Mathematica can calculate it quickly on a laptop.
  • Concerns are raised about limitations in programming languages, with a participant noting that many only store numbers up to a certain number of digits, while suggesting the use of Java's BigInteger class for larger numbers.
  • Participants discuss the possibility of running Mathematica remotely due to memory limitations on personal computers, with one providing a link to a service offering Mathematica.
  • There is mention of the efficiency of calculating large numbers compared to proving their primality, with references to encryption algorithms that rely on this difference.
  • One participant expresses a desire to develop a more efficient primality test for a prize related to calculating a prime with 1 billion digits.
  • Another participant discusses the AKS primality test as a well-known method and mentions the quadratic residue test as an efficient way to eliminate composite numbers without finding factors.
  • GMP, a C and C++ library, is recommended for handling arbitrarily large numbers, alongside Java's BigInteger.
  • One participant strongly recommends ARIBAS as a software option for large number calculations.

Areas of Agreement / Disagreement

Participants express a range of views on the best software and methods for calculating large numbers, with no clear consensus on a single solution. Various software options and algorithms are proposed, indicating multiple competing perspectives.

Contextual Notes

Participants highlight limitations related to memory and computational efficiency when dealing with very large numbers, but do not resolve these issues. The discussion includes various assumptions about the capabilities of different software and hardware.

Who May Find This Useful

This discussion may be useful for individuals interested in computational mathematics, software development for large number calculations, and those exploring primality testing algorithms.

clearwater304
Messages
88
Reaction score
0
For instance, the largest known prime number has nearly 13 million decimal digits. Would any normal computer be able to calculate this?
 
Physics news on Phys.org
I don't know what you mean by a "normal" computer. Obviously it took a computer to get this number.
 
I think you mean the Mersenne prime 2^43112609 -1. Mathematica running on my laptop calculated this number in under 2 minutes, so the answer to your question is yes.
 
Awsome. I know when I took java a few years ago a lot of software would only store numbers up to a certain number of digits.
 
Is there a way I can run mathematica remotely on their server. If I try to do a primality test on a very large number on my notebook it gives me a recursive error. I suppose this is due to the fact that it ran out of memory and I only have 4gb on my notebook.
 
Awsome. I know when I took java a few years ago a lot of software would only store numbers up to a certain number of digits

Most programming languages have limited size integer values because they just block off a certain (small) size of memory.

You can use java's BigInteger class to store numbers of arbitrarily large size (up to your machine's memory limit I guess)
 
clearwater304 said:
Is there a way I can run mathematica remotely on their server.

I don't know anything about these folks, but they seem to offer Mathematica service.

http://www.nimbisservices.com/catalog/cloud-services-mathematica
 
Last edited by a moderator:
Mathematica seems to be the way to go, now I just have to create a customized primality test so it doesn't take a year to prove.
 
What are you trying to do? Calculating a number like this is much, much faster than proving that it is prime. Encryption algorithms rely on the fact that multiplying two large primes to generate a large composite is much (much) faster than extracting these two primes from the resulting composite.
 
  • #10
there's this prize given by the eff for calculating a prime with 1 billion digits. I want to develop a primality test to make the computing time more efficient.
 
  • #11
phyzguy said:
What are you trying to do? Calculating a number like this is much, much faster than proving that it is prime. Encryption algorithms rely on the fact that multiplying two large primes to generate a large composite is much (much) faster than extracting these two primes from the resulting composite.
I'm don't think that you meant this, but it should be reiterated that one does not ever need to find a factor of a number to prove that it's composite, even for extraordinarily large numbers.
 
  • #12
clearwater304 said:
Is there a way I can run mathematica remotely on their server. If I try to do a primality test on a very large number on my notebook it gives me a recursive error. I suppose this is due to the fact that it ran out of memory and I only have 4gb on my notebook.
Solving 10^13000000=2^x gives x~40000000, which means it will take about 40 million bits to represent the number, which would be 5 million bytes. Since most computers have on the order of billions of bytes (gigabytes) the memory isn't the problem. The problem is the computation.

clearwater304 said:
Mathematica seems to be the way to go, now I just have to create a customized primality test so it doesn't take a year to prove.
Good luck with that. You might want to look at some other the existing ones first. The AKS primality test is the best known primality test.

Feryll said:
I'm don't think that you meant this, but it should be reiterated that one does not ever need to find a factor of a number to prove that it's composite, even for extraordinarily large numbers.
You do it you want your algorithm to be anywhere near efficient. EDIT: Never mind, I was wrong. I was presuming you were referring to the Wilson test, but I just remembered the quadratic residue test, which is a very efficient way to eliminate a lot of composite numbers without finding a factor.

clearwater304 said:
For instance, the largest known prime number has nearly 13 million decimal digits. Would any normal computer be able to calculate this?
GMP, a C and C++ library, can handle arbitrarily large numbers and is very heavily optimized. So can Java's BigInteger, but I don't know how optimized it is.
 
Last edited:

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
Replies
10
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
17
Views
1K
  • · Replies 17 ·
Replies
17
Views
3K
Replies
14
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 28 ·
Replies
28
Views
3K
  • · Replies 3 ·
Replies
3
Views
1K