We are pleased to announce the release of GMP-ECM 5.0. The source file
is available from:
and some binaries
are available thanks to Torbjörn Granlund
(please read the README file).
This is a major release, after version 4c which was released more than
three years ago. The main changes with respect to version 4c are:
(a) functionality: the program now implements also the P-1 and P+1 methods,
with a common step 2 (use option -pm1 to call P-1, -pp1 for P+1).
Options -save/-resume enable one to save the state at the end of step 1,
and to continue it afterwards, or on a different computer.
It is now possible to specify a range B2min-B2max for step 2. This
enables one to perform a huge step 2 (for a given step 1) using several
computers: the first one checks B1-B2, the second one B2-B3, ...
Version 5.0 is upward compatible with version 4c, except the parameter
'sigma' is now an option: ecm4c b1 s b2 becomes ecm5 -sigma s b1 b2.
No binaries are distributed so far, since version 5.0 is very easy to
compile: it only requires to have the GNU MP library installed. Detailed
instructions how to install and optimize the use of gmp-ecm are to be found
in the INSTALL and README files.
(b) implementation: the code is split into several files to make the code
easier to maintain and compile. In particular interfacing with
another program is much easier.
(c) efficiency: step 1 is slightly faster, thanks to a new modular
multiplication layer. Step 2 is much faster, due to the use of
improved polynomial arithmetic (now uses Toom-Cook 3 and Toom-Cook 4,
instead of only Karatsuba in version 4c).
Many thanks to Jay Berg, Paul Leyland, Joe Leherbauer and Torbjörn
whose contribution was essential to improve this release.
Known problems in ecm-5.0 (most of them fixed in
When the input number is divisible by 2 or 3, ecm-5.0 sometimes
reports that 1 is a factor. Workaround: first remove factors 2 and 3
before using ecm-5.0.
When the B1 value (or B2min when using B2min-B2 as second argument) is
too large, an overflow may occur and the computations in stage2 are incorrect.
This occurs when B1 or B2min is near or above 232.
We have currently no workaround for this, but the problem can be detected
by applying the following patch to the file
When using P-1 with B1 larger than one million, it may be faster to
use the option -mpzmod than the default modular arithmetic.
When both sigma and A values are given, save file lines are not
written correctly: patch.
Known problems in ecm-5.0.1
Compilation with NTL fails. Patch
(changes version into 5.0.2).
(Mentioned by Philip McLaughlin.)
Some computers (e.g. Apple) change the \n newline character
to \r, which makes ecm fail on files with multiple numbers.
Some memory allocation calls in ecm-5.0.1 do not check if they were
successful or not, which may cause some memory faults.
Apply that patch to get an error instead.
Known problems in ecm-5.0.2
Some factors are missed. This bug is fixed in