Last updated: April 3, 2008 by Ernst Mayer
"Share and Enjoy" — The Amdahl 6 motto
Mersenne Prime Freeware
Software for non-x86 processorsCurrently the best programs for non-x86 CPUs are the following:
(Note that some of these links may be dead, and much of the software is strictly of historical interest.)
lucdwt.c is Dr. Richard Crandall's original Mersenne number testing program. Written in generic 'C'.
George Woltman's lightning-fast Pentium program has its roots in this code.
Reported to be OK:
- Sun Ultra Enterprise 3000 with Solaris 2.5.1
- Linux (i386)
- other UNIX flavors
- mers 6.50 is a collection of programs guarded by Will Edgington, the Abbé of Revision Control. This is most useful for machines not running MS-Windows, OS/2, i386 Linux, or PowerPC-based MacOS.
fftlucas.c, Dr. Crandall's Mersenne primality test program in generic 'C'. Program mersenne1.c (below) is faster. Ported to (at least) these platforms:
- Known to be OK:
- SunOS 4.x (Solaris 1.x)
- Intel Linux using gcc v2.6.2 and up
- Reported to be OK:
- SunOS 5.x (Solaris 2.x) (need to edit Makefile)
- HPUX (version ?)
- CSet++ V3 under IBM's AIX 4
- Known to be OK:
- fftll is a script that runs mersenne1, fftlucas, mersenne2, or MacLucas UNIX
mersenne1.c, Lucas-Lehmer Mersenne number primality tests. Jason Kline modified/tuned Dr. Crandall's code. This program is faster than fftlucas.c.
The programs are well-documented. See the source for details. There are two versions. Should compile and run on UNIX systems, e.g. Sun SPARCs, SGIs, and HPs.
- Faster Version (breaks up the FFT) (actually a Hartley Transform) – mersenne1.c does the LL test
- Slower Version (FFT can be replaced) – mersenne2.c
- CSet++ V3 under IBM's AIX 4
- SGI IRIX 5.x
- This list needs to be updated
- MacLucasUNIX – Lucas-Lehmer tester based on code by John Sweeney that is usually about twice the speed of the other Lucas-Lehmer programs provided in Mers.
- extract.c – Translates the GIMPS master file database to HRF (Human Readable Format). This program is portable and reads George's database, mers package checkpoints including with the factorers for inputting the power of 2 format. If you want HR data, see www.mersenne.org/primenet/.
- mersfacgmp – A trial factorer, original author anonymous, with Free Software Foundation (FSF) libgmp.a arbitrary precision library support libgmp.a source code, also available from numerous FSF/GNU mirror sites.
- mersfacint – A trial factorer based on mersfacgmp and the original program but using 64-bit integer changes by Rob Hooft.
- mersfaclip – A trial factorer based on mersfacgmp that uses the freeLIP package (written by Ajren Lenstra and presently maintained by Paul Leyland) rather than libgmp.a. FreeLIP is available here. As with the mers package itself, you probably want the newest version available.
- ecm3 – An ECM (elliptic curve method) factorer that uses freeLIP's ECM functions to attempt to find factors of small Mersenne numbers, which works for composite as well as prime exponents, though it does not always completely factor composite exponent Mersennes. Based on code by Eric Prestemon.
- contract – New with the 3.0 release of the package, this program is based on code from Jean-Charles Meyrignac and reads the file lowM.txt and produces a DATABASE file in the form expected by George Woltman's Prime95 and other programs.
- mmtrial – Based on code by Rob Hooft, tries to factor M(M(p)) with trial division. See MMPstats.txt and also mmfac.
- Makefile – makefile for the above programs.
- lucas.cal – Landon Noll's implementation of The Amdahl 6 method to find humongous Mersenne-like primes. Needs the calc package (below) on this page.
- prime on ftp.cray.com – FORTRAN and C versions of a program to compute Mersenne numbers in decimal so that they may be printed. The algorithm is credited to Slowinski of CRI.
- pzilla.for – FORTRAN program by Walt Colquitt and Luke Welsh that found M110503. Optimized for vector machines (supercomputers).
- oiler.for – FORTRAN program by Luke Welsh to factor Mersenne numbers. Written for vector machines (supercomputers). Named "oiler" instead of "euler" because it ran on the NEC SX-2 in Houston, Texas. There are better algorithms than the ones employed in this program.
- primeos2 3.3.1 and primeemx 3.3.1 – Ports by Michiel van Loon of George Woltman's mprime to OS/2 and the EMX 32-bit DOS expander. To use the EMX version, you need the EMX runtime (v0.9c).
- OS/2Prime by Marcel van de Vusse (firstname.lastname@example.org). This is an OS/2 port of George Woltman's Linux prime v1.1. Second preliminary release for OS/2. It allows you to change the priority at which the program is running. From Legacy Software.
- ecm3 – DOS binary of GMP-ECM version 3. See the ECMNet homepage.
- mmfac – A DOS program for factoring M(M(p)) numbers written by Conrad Curry. See MMPstats.txt for a status of these numbers.
- genprost.tgz – Yuri Sorkin's program that generates all primes < 231. Very fast. Written in C. Takes only 3 minutes on a 486 DX2/80 to generate all 7,603,553 primes less than 227. ~35 minutes for all p < 231.
- mprint on the apfloat home page (Finland) – for printing Mersenne numbers in arbitrary bases. Optimized for either 486 or Pentium. Written by Mikko Tommila.
- David Fred generated decimal expansions for all 37 known Mersenne primes and corresponding perfect numbers. This includes the source code, but requires GNU gmp math package. mersperf.tgz or mersperf.zip (each ~5MB).
Libraries & Developer-oriented links
gmp 2.0.2 – from the README:
GNU MP is a library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers. It has a rich set of functions, and the functions have a regular interface. GNU MP is designed to be as fast as possible, both for small operands and for huge operands. The GMP homepage is at https://gmplib.org/.
- FreeLIP 1.1 1.1 – a free for non-commerical usage Large Integer Package. This software was originally written by Arjen K Lenstra but is now maintained by Paul Leyland (email@example.com). Bug reports, ports to novel architectures, enhancements, suggestions, etc should be directed to pcl.
- Jörgs ugly HFLOAT page – HUGE-FLOAT package for calculating very large floating point numbers.
- Jörgs ugly FXT page – Jörgs has links and source code to various FFT and related algorithms.
- apfloat – a C++ High Performance Arbitrary Precision Arithmetic Package by Mikko Tommila.
- calc – C-style arbitrary precision calculator.
Thanks go to...
- Will Edgington for keeping a tight rein on revision control
- Ernst W. Mayer for sending update summaries
- Ethan M. O'Connor and Lennart Grebelius for mirroring this page
- Yuri Sorkin for co-authoring the original of this page
- Luther Welsh for co-authoring the original of this page
- George Woltman for starting the GIMPS project
- Jeff Woods for providing space on delta.com
- Bryan Fullerton for a mirror and providing space on ftp.samurai.com