GMP is a free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating-point numbers. There is no practical limit to the precision except the ones implied by the available memory in the machine GMP runs on. GMP has a rich set of functions, and the functions have a regular interface.
The main target applications for GMP are cryptography applications and research, Internet security applications, algebra systems, computational algebra research, etc.
GMP is carefully designed to be as fast as possible, both for small operands and for huge operands. The speed is achieved by using fullwords as the basic arithmetic type, by using fast algorithms, with highly optimised assembly code for the most common inner loops for a lot of CPUs, and by a general emphasis on speed.
The first GMP release was made in 1991. It is continually developed and maintained, with a new release about once a year.
Since version 6, GMP is distributed under the dual licenses, GNU LGPL v3 and GNU GPL v2. These licenses make the library free to use, share, and improve, and allow you to pass on the result. The GNU licenses give freedoms, but also set firm restrictions on the use with non-free programs.
GMP is part of the GNU project. For more information about the GNU project, please see the official GNU web site.
GMP's main target platforms are Unix-type systems, such as GNU/Linux, Solaris, HP-UX, Mac OS X/Darwin, BSD, AIX, etc. It also is known to work on Windows in both 32-bit and 64-bit mode.
GMP is brought to you by a team listed in the manual.
GMP is carefully developed and maintained, both technically and legally. We of course inspect and test contributed code carefully, but equally importantly we make sure we have the legal right to distribute the contributions, meaning users can safely use GMP. To achieve this, we will ask contributors to sign paperwork where they allow us to distribute their work.
There are several categories of functions in GMP:
GMP 6.1.0 lz, 1943881 bytes xz, 1950316 bytes bz2, 2383840 bytes gmplib.org gmp-6.1.0.tar.lz gmp-6.1.0.tar.xz gmp-6.1.0.tar.bz2
GMP releases are also available from the mirrors of ftp.gnu.org.
To try to verify that the file you have downloaded has not been tampered
with, you can check that the GnuPG signature matches the contents of the file.
GnuPG software or a
key server directly to get the key that was
used for creating the signature. Starting from the repackaging of gmp-5.1.0 as
gmp-5.1.0a.tar.* the following key is used to sign GMP releases:
Key ID: 0x28C67298
Key type: 2560 bit RSA
Fingerprint: 343C 2FF0 FBEE 5EC2 EDBE F399 F359 9FF8 28C6 7298
Earlier releases, up to and including the gmp-5.1.0.tar.* files, were signed
with the following key:
Key ID: 0xDB899F46
Key type: 1024 bit DSA
Fingerprint: 73D4 6C36 6746 1E4B D939 7249 5D6D 47DF DB89 9F46
The release gmp-6.1.0.tar.* files, were signed with the following key:
Key ID: 0xC1A000B0
Key type: 1024 bit DSA
Fingerprint: 5972 C482 24C1 E7E6 2AA0 275D 1150 EE33 C1A0 00B0
Alternatively, you could check a cryptographic checksum:
SHA1 gmp-6.1.0.tar 9ab94feb71279fab2215a5f0e0355bec3b6a265c SHA256 gmp-6.1.0.tar 7afbeccd5b248a4996ad9ff08f66dc46d30fa53364ba436dfb86d67fc4a35848
Instead of using a release, you may also get the latest code from the GMP repositories. This will require some more work compared to using a release.
Please first see the manual on how to report bugs. The proper address for bug reports is gmp-bugs at gmplib.org.
Most problems with GMP these days are due to problems not in GMP, but with the compiler used for compiling the GMP sources. This is a major concern to the GMP project, since an incorrect computation is an incorrect computation, whether caused by a GMP bug or a compiler bug. We fight this by making the GMP testsuite have great coverage, so that it should catch every possible miscompilation.
List Subscribe URL Archive URL Purpose gmp-bugs gmplib.org/mailman/listinfo/gmp-bugs gmplib.org/list-archives/gmp-bugs/ Bug reports (not questions!). See manual. gmp-announce gmplib.org/mailman/listinfo/gmp-announce gmplib.org/list-archives/gmp-announce/ Announcements from the developers (very little traffic) gmp-discuss gmplib.org/mailman/listinfo/gmp-discuss gmplib.org/list-archives/gmp-discuss/ Questions, Help, Discussions gmp-devel gmplib.org/mailman/listinfo/gmp-devel gmplib.org/list-archives/gmp-devel/ Technical discussions between developers gmp-commit gmplib.org/mailman/listinfo/gmp-commit gmplib.org/list-archives/gmp-commit/ Commit messages
Note that we perform spam and virus filtering of these lists. The lists have been 100% spam-free during the last years.
You cannot subscribe an AOL address to any GMP mailing list, since AOL blocks our mail server until we register with them as a "bulk mailer", something we will certainly never do.
We're blocking all mail from China, since 99% of the spam arriving to the GMP moderators emanates from China. If you are affected but have a legitimate reason to send mail to the GMP project, e.g., if you work at a university or corporation with an interest in GMP, please let us know; we will open access for you.
The current stable release is 6.1.0, released 2015-11-01.
Issues with GMP 6.1.0:
Issues with GMP 6.0.0:
Issues with GMP 5.1.3:
mpn_set_stris incorrect and incomplete wrt allocation requirements. Patch.
Issues with GMP 5.1.2:
mpn_sbpi1_div_r_seccompute incorrect results for some operands. With uniformly distributed random operands, the error is very hard to trigger, and for the intended use of these functions, operands can be expected to appear as such random operands from these functions' perspective. Patch.
Issues with GMP 5.1.1:
mpz_powm_uicomputes garbage if the base argument is over 15000 decimal or the mod argument is at least 7500 decimal digits. No other GMP powm function is affected. Patch.
Issues with GMP 5.1.0:
distchecktarget which creates a world-writable directory. This target is not used in the GMP release process, but it is a potential security problem affecting users who invoke this make target. This problem (and no other) is corrected in the gmp-5.1.0a.tar.* set of files.
For patches to older GMP versions, please see the Info on older GMP releases.
Please see the GMPng page for information on what we're working on.