Prime95, also distributed as the command-line utility mprime for
FreeBSD
FreeBSD is a free and open-source Unix-like operating system descended from the Berkeley Software Distribution (BSD), which was based on Research Unix. The first version of FreeBSD was released in 1993. In 2005, FreeBSD was the most popular ...
and
Linux
Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, which i ...
, is a
freeware
Freeware is software, most often proprietary, that is distributed at no monetary cost to the end user. There is no agreed-upon set of rights, license, or EULA that defines ''freeware'' unambiguously; every publisher defines its own rules for t ...
application written by
George Woltman
George Woltman (born November 10, 1957) is the founder of the Great Internet Mersenne Prime Search (GIMPS), a distributed computing project researching Mersenne prime numbers using his software Prime95. He graduated from the Massachusetts Institu ...
. It is the official client of the
Great Internet Mersenne Prime Search
The Great Internet Mersenne Prime Search (GIMPS) is a collaborative project of volunteers who use freely available software to search for Mersenne prime numbers.
GIMPS was founded in 1996 by George Woltman, who also wrote the Prime95 client an ...
(GIMPS), a
volunteer computing
Volunteer computing is a type of distributed computing in which people donate their computers' unused resources to a research-oriented project, and sometimes in exchange for credit points. The fundamental idea behind it is that a modern desktop co ...
project dedicated to searching for
Mersenne prime
In mathematics, a Mersenne prime is a prime number that is one less than a power of two. That is, it is a prime number of the form for some integer . They are named after Marin Mersenne, a French Minim friar, who studied them in the early 17 ...
s. It is also used in
overclocking
In computing, overclocking is the practice of increasing the clock rate of a computer to exceed that certified by the manufacturer. Commonly, operating voltage is also increased to maintain a component's operational stability at accelerated spe ...
to test for system stability.
Although most
of its
source code is available, Prime95 is not
free and open-source software
Free and open-source software (FOSS) is a term used to refer to groups of software consisting of both free software and open-source software where anyone is freely licensed to use, copy, study, and change the software in any way, and the source ...
because its
end-user license agreement
An end-user license agreement or EULA () is a legal contract between a software
Software is a set of computer programs and associated software documentation, documentation and data (computing), data. This is in contrast to Computer hardware ...
states that if the software is used to find a prime qualifying for a bounty offered by the
Electronic Frontier Foundation
The Electronic Frontier Foundation (EFF) is an international non-profit digital rights group based in San Francisco, California. The foundation was formed on 10 July 1990 by John Gilmore, John Perry Barlow and Mitch Kapor to promote Internet ...
,
then that bounty will be claimed and distributed by GIMPS.
Finding Mersenne primes by volunteer computing
Prime95 tests numbers for primality using the
Fermat primality test
The Fermat primality test is a probabilistic test to determine whether a number is a probable prime.
Concept
Fermat's little theorem states that if ''p'' is prime and ''a'' is not divisible by ''p'', then
:a^ \equiv 1 \pmod.
If one wants to tes ...
(referred to internally as PRP, or "probable prime"). For much of its history, it used the
Lucas–Lehmer primality test
In mathematics, the Lucas–Lehmer test (LLT) is a primality test for Mersenne numbers. The test was originally developed by Édouard Lucas in 1876 and subsequently improved by Derrick Henry Lehmer in the 1930s.
The test
The Lucas–Lehmer t ...
, but the availability of Lucas–Lehmer assignments was deprecated in April 2021 to increase search throughput. Specifically, to guard against faulty results, every Lucas–Lehmer test had to be performed twice in its entirety, while Fermat tests can be verified in a small fraction of their original run time using a proof generated during the test by Prime95. Current versions of Prime95 remain capable of Lucas–Lehmer testing for the purpose of double-checking existing Lucas–Lehmer results, and for fully verifying "probably prime" Fermat test results (which, unlike "prime" Lucas–Lehmer results, are not conclusive).
To reduce the number of full-length primality tests needed, Prime95 also implements other, computationally simpler tests designed to filter out unviable candidates; as of 2021, this mainly comprises
Pollard's p – 1 algorithm. The
elliptic-curve factorization method and (in preview releases starting with 30.6)
Williams's p + 1 algorithm are implemented, but are considered not useful at modern GIMPS testing levels, and mostly used in attempts to
factor
Factor, a Latin word meaning "who/which acts", may refer to:
Commerce
* Factor (agent), a person who acts for, notably a mercantile and colonial agent
* Factor (Scotland), a person or firm managing a Scottish estate
* Factors of production, ...
much smaller Mersenne numbers that have already undergone primality testing. Prime95 implements
trial division
Trial division is the most laborious but easiest to understand of the integer factorization algorithms. The essential idea behind trial division tests to see if an integer ''n'', the integer to be factored, can be divided by each number in turn ...
, but because this type of work can be executed using
single-precision
Single-precision floating-point format (sometimes called FP32 or float32) is a computer number format, usually occupying 32 bits in computer memory; it represents a wide dynamic range of numeric values by using a floating radix point.
A floati ...
arithmetic (as opposed to the
double-precision
Double-precision floating-point format (sometimes called FP64 or float64) is a floating-point number format, usually occupying 64 bits in computer memory; it represents a wide dynamic range of numeric values by using a floating radix point.
Fl ...
arithmetic required by other GIMPS work types), almost all GIMPS trial division is done by third-party clients implementing
GPU
A graphics processing unit (GPU) is a specialized electronic circuit designed to manipulate and alter memory to accelerate the creation of images in a frame buffer intended for output to a display device. GPUs are used in embedded systems, mob ...
computation for its comparatively much greater single-precision throughput.
GIMPS has discovered 17 new Mersenne primes since its foundation in 1996, all using Prime95.
Each was the
largest known prime number
The largest known prime number () is , a number which has 24,862,048 digits when written in base 10. It was found via a computer volunteered by Patrick Laroche of the Great Internet Mersenne Prime Search (GIMPS) in 2018.
A prime number is a pos ...
at the time of its discovery, except M
37156667 and M
42643801, which were discovered out of order from the larger M
43112609.
Use for stress testing

To maximize search throughput, most of Prime95 is written in hand-tuned
assembly
Assembly may refer to:
Organisations and meetings
* Deliberative assembly, a gathering of members who use parliamentary procedure for making decisions
* General assembly, an official meeting of the members of an organization or of their representa ...
, which makes its system resource usage much greater than most other computer programs. Additionally, due to the high precision requirements of primality testing, the program is very sensitive to computation errors and proactively reports them. These factors make it a commonly used tool among
overclockers
In computing, overclocking is the practice of increasing the clock rate of a computer to exceed that certified by the manufacturer. Commonly, operating voltage is also increased to maintain a component's operational stability at accelerated ...
to check the stability of a particular configuration.
See also
*
List of volunteer computing projects
This is a comprehensive list of volunteer computing projects; a type of distributed computing where volunteers donate computing time to specific causes. The donated computing power comes from idle CPUs and GPUs in personal computers, video game c ...
*
Stress testing
Stress testing (sometimes called torture testing) is a form of deliberately intense or thorough testing used to determine the stability of a given system, critical infrastructure or entity. It involves testing beyond normal operational capacity, ...
*
Prime number
A prime number (or a prime) is a natural number greater than 1 that is not a product of two smaller natural numbers. A natural number greater than 1 that is not prime is called a composite number. For example, 5 is prime because the only way ...
*
PrimeGrid
PrimeGrid is a volunteer computing project that searches for very large (up to world-record size) prime numbers whilst also aiming to solve long-standing mathematical conjectures. It uses the Berkeley Open Infrastructure for Network Computing ...
References
External links
* with downloads for various architectures
* How to use Prime95 for stress (torture) testing
[{{Cite web , title=Torture test your CPU with Prime95 , url=http://www.playtool.com/pages/prime95/prime95.html , access-date=2022-09-15 , website=www.playtool.com]
Volunteer computing projects
Primality tests
Benchmarks (computing)
Great Internet Mersenne Prime Search
Science software for macOS
Science software for Windows
Science software for Linux
BSD software
Mathematical software