Introduction to GMP

The GMP package contains math libraries. These have useful functions for arbitrary precision arithmetic.

Package Information

User Notes:

Installation of GMP

Install GMP by running the following commands:

./configure --prefix=/usr --enable-cxx --enable-mpbsd &&

If you have teTeX-3.0 installed and you wish to create alternate formats of the documentation, issue any or all of the following commands:

make -C doc pdf &&
make -C doc ps &&
make -C doc html &&
texi2html -o doc/gmp_nochunks.html doc/gmp.texi &&
makeinfo --plaintext -o doc/gmp.txt doc/gmp.texi

To test the results, issue: make check. Owing to various reports of mis-compilations, the maintainer strongly recommends running the test-suite and reporting any failures. The libraries should not be used in a production environment if there are problems running make check. An easy way to determine if all the tests passed is to redirect the output of the tests to a file (make check >check.log 2>&1) and issue the following command:

awk '/tests passed/{total+=$2} ; END{print total}' check.log

139 should be returned.

Now, as the root user:

make install

If you created any of the alternate formats of the documentation, install it using the following commands as the root user:

install -v -m755 -d /usr/share/doc/gmp-4.2/html &&
install -v -m644 doc/gmp.html/* /usr/share/doc/gmp-4.2/html &&
install -v -m644 doc/{isa_abi_headache,configuration} \
                 doc/*.{pdf,dvi,ps,html,txt} \

Command Explanations

--enable-cxx: This parameter enables C++ support by building the libgmpxx libraries.

--enable-mpbsd: This parameter enables building the Berkeley MP compatibility (libmp) libraries.


Installed Programs: None
Installed Libraries: libgmp.{so,a}, libgmpxx.{so,a} and libmp.{so,a}
Installed Directories: None

Short Descriptions


contains functions to operate on signed integers, rational numbers, and floating point numbers.

Last updated on 2006-06-21 11:26:07 -0500