News and releases!

MPIR 1.3.1 is available! Note the MPIR 1.3.x libraries are overall licensed LGPL v2+. They contain NO LGPL v3+ files as earlier versions of MPIR did.

The main new features of the MPIR 1.3.x series are:
  • Faster Euclidean division by single limb quotient
  • Faster Euclidean mp division where only the quotient is required
  • Faster root code
  • Faster factorial code due to Robert Gerbicz using an algorithm of Schonhage (see here for details)
  • Improved primality testing
  • New random functions without global state
  • Speedups to GCD and extended GCD
  • Middle product functions due to David Harvey (see here for details)
  • Approximate quotient functions
  • Many new assembly functions and speedups on x86_64
  • Additional unbalanced Toom-4 multiplication routines
  • Improved mulhi and mullo routines
  • Switched on assembly improvements to FFT code
  • Many new x86_64 assembly functions and speedups
  • Improved 32 bit x86 assembly code
  • Initial support for Via Nano and Phenom II chips
  • Better 64 bit Atom assembly code
  • Implemented Peter Montgomery's remainder algorithms
  • Improved Windows timing code
  • Improved Windows assembly support for AMD64, p3 and p4
  • Batch build system for Windows
  • New benchmark program (distributed separately)
  • Support for new family 6, model 30 CPU

Click one of the links to begin download.

MPIR Source Code and Documentation:

MPIR Version 1.3.1 - download source (LGPL v2+)
New features of MPIR 1.3.x
Documentation for version 1.3.1





MPIR Benchmark 2 (Brian Gladman, Jeff Gilchrist and Jason Moxham):

mpir_bench_two.tar.gz
mpir_bench_two.zip

N.B: the benchmark is for development purposes only, and will not give a fair comparison between different libraries. See for example the Mersenne and Fermat tests, which use MPIR functionality not necessarily present in other libraries.

IMPORTANT NOTE (updated for MPIR 1.3.0):

By default MPIR produces libmpir, libmpirxx binaries and mpir.h. For libgmp, libgmpxx and gmp.h use the --enable-gmpcompat configure option. (See section 2 of the documentation for more details.) We have removed the previous requirement to type "make install-gmpcompat".

Known Issues:

  • Cygwin32: make check fails if build path contained spaces - trac #28
  • MSYS32: make check fails if only a shared library is built (the library should be compiled correctly though) - trac #199
  • Make tune will core dump with small probability on some loaded machines - trac #34
  • Fat binary x86_64 build will fail with old GNU and Sun assembler versions - trac #133
  • Test failure (mpz/t-export) on a Pentium-D with gcc 4.1.2 - appears to be a problem with the C library function memcmp not MPIR - trac #168
  • MPN_ZERO miscompiles on ia64 with gcc 4.1.2 - trac #223
  • The mpirbench program may fail to build on some platforms - trac #196
  • Tuning code fails on mips64el - trac #207
  • icc build will fail on itanium - trac #201
  • The pollard_rho demo temporarily doesn't build - trac #277

MPIR 1.2.2 is released! Note MPIR 1.2.2 is overall LGPL v3+ due to us accidentally including an LGPL v3 file (mpf/set_str.c). Please distribute this version of the library under the terms of this license!

This release fixes some issues with fat binaries on 32 bit x86 machines that were discovered in MPIR 1.2. The main new features of the MPIR 1.2.x series are:

  • Further improvements to assembly support for K8/K10/Core2/Pentium 4 including improvements to multiplication and division by 2 limbs by Jason Moxham and ported to Windows by Brian Gladman.
  • Merged the new FFT of Pierrick Gaudry, Alexander Kruppa and Paul Zimmermann (see here for details) as revised by Torbjorn Granlund and subsequently modified and improved for MPIR by William Hart and Brian Gladman.
  • Faster Toom 3/4/7 code, toom squaring code and Toom 3 and 4 variants for unbalanced operands, contributed by William Hart.
  • Fast extended GCD for large operands, based on Niels Moller's ngcd algorithm, contributed by William Hart.

Click one of the links to begin download.
MPIR Version 1.2.2 - download source (LGPL v3+)
New features of MPIR 1.2.x
Documentation for version 1.2.2






Known Issues:

  • Cygwin32: make check fails if build path contained spaces - trac #28
  • MSYS32: make check fails if only a shared library is built (the library should be compiled correctly though) - trac #199
  • X86 32 bit Apple gcc: no PIC support in assembly code - trac #94
  • Make tune will core dump with small probability on some loaded machines - trac #34
  • Fat binary x86_64 build will fail with old GNU and Sun assembler versions - trac #133
  • Test failure (mpz/t-export) on a Pentium-D with gcc 4.1.2 - appears to be a problem with the C library function memcmp not MPIR - trac #168
  • MPN_ZERO miscompiles on ia64 with gcc 4.1.2 - trac #223
  • The mpirbench program may fail to build on some platforms - trac #196
  • Tuning code fails on mips64el - trac #207

Click one of the links to begin download.

MPIR 1.1.2 is released! Note MPIR 1.1.2 is overall LGPL v3+ due to us accidentally including an LGPL v3 file (mpf/set_str.c). Please distribute this version of the library under the terms of this license!

The main new features of the MPIR 1.1.x series are better CPU detection, improvements to assembly support for K8/K10/Core2/Pentium 4 including improvements to division by certain small constants and euclidean division by a single limb. There is also some improvement to integer multiplication due to new Toom 4 and Toom 7 implementations.

MPIR Version 1.1.2 - download source (LGPL v3+)
New features of MPIR 1.1.x
Documentation for version 1.1.2


Important note:

By default MPIR now produces libmpir, libmpirxx binaries and mpir.h. For libgmp, libgmpxx and gmp.h use the --enable-gmpcompat configure option. If you wish to install the GMP named libraries and gmp.h, you must also make install-gmpcompat after the usual make install. (See section 2 of the documentation for more details.)

Known Issues:

  • Cygwin32: make check fails if build path contained spaces
  • X86 32 bit Apple gcc: no PIC support in assembly code
  • Make tune will core dump with small probability on loaded machines
  • Possible memory leak in t-locale
  • Fat binary x86_64 build will fail with old GNU and Sun assembler versions
  • Test failure (mpz/t-export) on a Pentium-D with gcc 4.1.2 - appears to be a problem with the C library function memcmp not MPIR.
  • The mpirbench program may fail to build on some platforms.

Click one of the links to begin download.

MPIR 1.0.0 is released! Note MPIR 1.0.0 is overall LGPL v3+ due to us accidentally including an LGPL v3 file (mpf/set_str.c). Please distribute this version of the library under the terms of this license!

The main new features are much faster assembly support for AMD K8/K10 and Intel Core 2, due primarily to the work of Jason Moxham.

MPIR Version 1.0.0 - download source (LGPL v3+)
New features of MPIR 1.0.0
Documentation for version 1.0.0



Important note:

By default MPIR now produces libmpir, libmpirxx binaries and mpir.h. For libgmp, libgmpxx and gmp.h use the --enable-gmpcompat configure option. If you wish to install the GMP named libraries and gmp.h, you must also make install-gmpcompat after the usual make install. (See section 2 of the documentation for more details.)

Known Issues:

  • Cygwin32: make check fails if build path contained spaces
  • X86 32 bit Apple gcc: no PIC support in assembly code
  • Make tune will core dump with small probability on loaded machines
  • Possible memory leak in t-locale
  • Berkeley MP functions temporarily unsupported in this release
  • Fat binary x86_64 build will fail with old GNU and Sun assembler versions
  • On some Darwin Tiger systems a linker bug will cause make check to fail. A workaround is described here:
  • mpir-devel
Click one of the links to begin download.

The first full release of MPIR is available!

Note MPIR 0.9.0 is overall LGPL v3+ due to us accidentally including an LGPL v3 file (mpf/set_str.c). Please distribute this version of the library under the terms of this license!

MPIR Version 0.9.0 - download source (LGPL v3+)
New features of MPIR 0.9.0
Documentation for version 0.9.0





Known Issues:

  • MSYS and mingw32: --enable-fat build failure
  • Cygwin32: make check fails if build path contained spaces
  • X86 32 bit Apple gcc: no PIC support in assembly code
  • Older Sun Blade servers: make tune will core dump with small probability
  • Possible memory leak in t-locale
  • Generic (without assembly support) build (--host=none) fails on x86_64
  • Configure and make fail outside the source tree