GNU Multi-Precision Library

From Wikipedia, the free encyclopedia

Jump to: navigation, search
GNU Multiple-Precision Library
Developer(s) The GNU Project
Stable release 4.3.1 / May 12, 2009
Written in C
Operating system Cross-platform
Type Mathematical software
License LGPL
Website gmplib.org

The GNU Multiple-Precision Library, also known as 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 (operand dimension limit is 231 bits on 32-bit machines and 237 bits on 64-bit machines[1]). GMP has a rich set of functions, and the functions have a regular interface. The basic interface is for C but wrappers exist for other languages including C++, OCaml, Perl, and Python. Kaffe java virtual machine have also used GMP to support java built-in arbitrary precision arithmetics in the past. This feature has been removed from the recent releases, causing protests from people that claim they used Kaffe for the sole reason GMP arithmetic being much faster than the typical implementations in other java distributions[2]. As a result, GMP support has been added to GNU Classpath [3].

The main target applications for GMP are cryptography applications and research, Internet security applications, and computer algebra systems.

GMP aims to be faster than any other bignum library for all operand sizes. Some important factors towards this end are:

  • Using fullwords as the basic arithmetic type.
  • Using different algorithms for different operand sizes. The algorithms that are fastest for really big numbers are seldom fastest for small numbers.
  • Highly optimized assembly code for the most important inner loops, specialized for different processors.

The first GMP release was made in 1991. It is continually developed and maintained. The current release is 4.3.1.

GMP is part of the GNU project (although the fact that its website is not on gnu.org might cause confusion), and is distributed under the GNU LGPL.

GMP is used for integer arithmetic in many computer algebra systems such as Mathematica[4].

GMP is required for building GCC.

[edit] References

[edit] External links

Personal tools