mpc: Arithmetic of complex numbers with arbitrarily high precision and correct rounding#


From GNU MPC is a C library for the arithmetic of complex numbers with arbitrarily high precision and correct rounding of the result. It extends the principles of the IEEE-754 standard for fixed precision real floating point numbers to complex numbers, providing well-defined semantics for every operation. At the same time, speed of operation at high precision is a major design goal.


LGPLv3+ for the code and GFDLv1.3+ (with no invariant sections) for the documentation.

Upstream Contact#

The MPC website is located at .

The MPC team can be contacted via the MPC mailing list:

Special Update/Build Instructions#

  • mpc_mul_faster.patch: Patch from Paul Zimmermann to speed up MPC multiplication (for small precisions) by reducing overhead in MPFR operations.




Version Information#



Equivalent System Packages#

$ apk add mpc1 mpc1-dev
$ conda install mpc
$ apt-cyg install libmpc-devel
$ sudo apt-get install libmpc-dev
$ sudo yum install libmpc libmpc-devel
$ sudo pkg install math/mpc
$ sudo emerge dev-libs/mpc
$ brew install libmpc
$ nix-env --install libmpc
$ sudo zypper install mpc-devel
$ sudo xbps-install libmpc-devel


If the system package is installed, ./configure will check if it can be used.