GMP Multiple Precision Arithmetic Library

GMP Multiple Precision Arithmetic Library

gmplib.org

1

About this website

GMP (GNU Multiple Precision Arithmetic Library) is a free library for arbitrary-precision arithmetic, operating on signed integers, rational numbers, and floating-point numbers. Originally developed by Torbjorn Granlund in 1991 as part of the GNU Project, GMP has become the standard for high-precision mathematical computation. Key features: arbitrary-precision integer arithmetic with no practical limit on number size, limited only by available memory. Operations include addition, subtraction, multiplication (using Karatsuba, Toom-Cook, and FFT-based algorithms for large numbers), division, modular arithmetic, exponentiation, GCD, and primality testing. Arbitrary-precision rational numbers (mpq) with automatic reduction and all integer operations. Floating-point arithmetic (mpf) with configurable precision for scientific and financial calculations requiring more digits than standard IEEE 754 double precision. Number theoretic functions including modular exponentiation, modular inverse, Jacobi symbol, Legendre symbol, factorial, binomial coefficients, Fibonacci numbers, and probabilistic and deterministic primality tests (Miller-Rabin, Lucas, BPSW). Comprehensive set of C functions with intuitive naming (mpz_add, mpz_mul, mpz_powm, etc.) and optional C++ class interface. Assembly-optimized code for major architectures (x86, x86_64, ARM, ARM64, MIPS, PowerPC, Alpha, IA-64) using hand-tuned assembly for critical inner loops, achieving performance often several times faster than competing libraries. Threading-safe design for use in multi-threaded applications. Used by Mathematica, Maple, SageMath, PARI/GP, OpenSSL, RSA cryptography, and countless cryptographic and mathematical applications. Open source under LGPL and GPL dual license.

Statistics

1
Views
0
Clicks
0
Like
0
Dislike

Comments

Log In to post a comment

No comments yet. Be the first!