Movatterモバイル変換


[0]ホーム

URL:


GMP «Arithmetic without limitations»


The GNU
Multiple Precision
Arithmetic Library
GNU head
Last modified: 2025-08-24





Documentation:6.3.0 HTML |6.3.0 PDF
Download:gmp-6.3.0.tar.xz |Release notes
  NEW 2023-07-30
Development:Developers' corner
GMPbench:Results |Download benchmark sources
Fun:Compute billions of digits of π using GMP!
Security:GMP server security policy
Page contents:
What is GMP?
Function categories
Download
Reporting bugs
Mailing lists
Current release status
Future releases
Thanks



Possible GMP/Ryzen 9000 incompatibilty

Back in February of 2025, the main GMP testing computer, a Ryzen 9950X based system, died. The CPU's pin side has a discoloured region of about 10 mm in diameter. The CPU was replaced within the warranty period.

Unfortunately, now in late August, the replacement CPU died in the exact same way as the old CPU. (The new CPU had a new motherboard and a new PSU for good measure.)

Before this problem is fully understood, we must caution people against using GMP heavily on any Zen 5 processor.

We suspect that GMP's extremely tight loops around MULX make the Zen 5 cores use much more power than specified, making cooling solutions inadequate.

More info



What is GMP?

GMP is a free library for arbitrary precision arithmetic, operating onsigned integers, rational numbers, and floating-point numbers. There is nopractical limit to the precision except the ones implied by the availablememory in the machine GMP runs on. GMP has a rich set of functions, and thefunctions have a regular interface.

The main target applications for GMP are cryptography applications andresearch, Internet security applications, algebra systems, computationalalgebra research, etc.

GMP is carefully designed to be as fast as possible, both for small operandsand for huge operands. The speed is achieved by using fullwords as the basicarithmetic type, by using fast algorithms, with highly optimised assembly codefor the most common inner loops for a lot of CPUs, and by a general emphasis onspeed.

The first GMP release was made in 1991. It is continually developed andmaintained, with a new release about once a year.

Since version 6, GMP is distributed under the dual licenses,GNU LGPL v3andGNU GPL v2.These licenses make the library free to use, share, and improve, and allow youto pass on the result. The GNU licenses give freedoms, but also set firmrestrictions 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 onWindows in both 32-bit and 64-bit mode.

GMP is brought to you by a teamlisted inthe manual.

GMP is carefully developed and maintained, both technically and legally. Weof course inspect and test contributed code carefully, but equally importantlywe make sure we have the legal right to distribute the contributions, meaningusers can safely use GMP. To achieve this, we will ask contributors to signpaperwork where they allow us to distribute their work.


GMP function categories

There are several categories of functions in GMP:

  1. High-level signed integer arithmetic functions (mpz). There are about 150 arithmetic and logic functions in this category.
  2. High-level rational arithmetic functions (mpq). This category consists of about 35 functions, but allmpz functions can be used too, by applying them to the numerator and denominator separately.
  3. High-level floating-point arithmetic functions (mpf). This is the GMP function category to use if the C type `double' doesn't give enough precision for an application. There are about 70 functions in this category. New projects should strongly consider using the much more complete GMP extension librarympfr instead of mpf.
  4. C++ class based interface to all of the above. (The C functions and types can of course be used directly from C++ too.)
  5. Low-level positive-integer, hard-to-use, very low overhead functions are found in thempn category. No memory management is performed; the caller must ensure enough space is available for the results. The set of functions is not always regular, nor is the calling interface. These functions accept input arguments in the form of pairs consisting of a pointer to the least significant word, and an integral size telling how many limbs (= words) there are in that argument. The functions in the other categories call mpn for almost all their calculations. Of these functions about 60 are public.

Download the latest release of GMP

GMP 6.3.0 lz, 2086209 bytes xz, 2094196 bytes zstd, 2176751 bytes
Main site, gmplib.org, via httpsgmp-6.3.0.tar.lzgmp-6.3.0.tar.xzgmp-6.3.0.tar.zst
USA, ftp.gnu.org, via httpsgmp-6.3.0.tar.lzgmp-6.3.0.tar.xzgmp-6.3.0.tar.zst

To try to verify that the file you have downloaded has not been tamperedwith, you can check that the GnuPG signature matches the contents of the file.Use yourGnuPG software or akey server directly to get the key that wasused for creating the signature. Starting from the repackaging of gmp-5.1.0 asgmp-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

Instead of using a release, you may also get the latest code from theGMP repositories. This will require somemore work compared to using a release.


Reporting bugs in GMP

Please first see themanual on how to report bugs. Theproper address for bug reports is gmp-bugs at gmplib.org.

Most problems with GMP these days are due to problems not in GMP, but withthe compiler used for compiling the GMP sources. This is a major concern tothe 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 GMPtestsuite have great coverage, so that it should catch every possiblemiscompilation.


GMP mailing lists

List Subscribe URL Archive URL Purpose
gmp-bugsgmplib.org/mailman/listinfo/gmp-bugsgmplib.org/list-archives/gmp-bugs/ Bug reports (not questions!). Seemanual.
gmp-announcegmplib.org/mailman/listinfo/gmp-announcegmplib.org/list-archives/gmp-announce/ Announcements from the developers (very little traffic)
gmp-discussgmplib.org/mailman/listinfo/gmp-discussgmplib.org/list-archives/gmp-discuss/ Questions, Help, Discussions
gmp-develgmplib.org/mailman/listinfo/gmp-develgmplib.org/list-archives/gmp-devel/ Technical discussions between developers
gmp-commitgmplib.org/mailman/listinfo/gmp-commitgmplib.org/list-archives/gmp-commit/ Commit messages

Starting in early 2024, we cannot deliver email to any gmail.com addresses.This is a result of that Google no longer trusts our email server. We havenever delivered spam to any gmail account, their policies are based on otherconsiderations.

Note that we perform spam and virus filtering of these lists. The listshave been 100% spam-free during the last years.

We're blocking all mail from many IP ranges, for spam mitigation. That evenincludes geo blocking. If you are affected but have a legitimate reason tosend mail to the GMP project, e.g., if you work at a university or corporationwith an interest in GMP, please let us know; we will open access for you.


Status of the current release

The current stable release is 6.3.0, released 2023-07-30.

Issues with GMP 6.3.0:
Issues with GMP 6.2.1:
Issues with GMP 6.2.0:
Issues with GMP 6.1.2:
Issues with GMP 6.1.1:
Issues with GMP 6.1.0:
Issues with GMP 6.0.0:
Issues with GMP 5.1.3:
Issues with GMP 5.1.2:
Issues with GMP 5.1.1:
Issues with GMP 5.1.0:

For patches to older GMP versions, please see theInfo on older GMP releases.


Future releases

Please see the GMPng page for information onwhat we're working on.


Thanks

Thanks to a very generous donation from Christian Calderon, the GMP project nowhas a brand new, AMD Epyc server which will replace the old server. This isgreat for GMP, not only because of the old server's hardware security issues,but also since the new server is 3x more powerful than the old one.

Here are the specs of the system Christian has given us:


Please send comments about this page to gmp-discuss
at
gmplib.org
Copyright 2000–2020 Free Software Foundation
Verbatim copying and distribution of this entire article is permittedin any medium, provided this notice is preserved.

[8]ページ先頭

©2009-2026 Movatter.jp