Introduction
Mpc is a C library for the arithmetic of complex numbers with arbitrarily high precision and correct rounding of the result. It is built upon and follows the same principles as Mpfr. The library is written by Andreas Enge, Philippe Théveny, Paul Zimmermann and Mickaël Gastineau and is distributed under the Gnu Lesser General Public License, either version 2.1 of the licence, or (at your option) any later version. The Mpc library has been registered in France by the Agence pour la Protection des Programmes on 2003-02-05 under the number IDDN FR 001 060029 000 R P 2003 000 10000.
News
The second Mpfr/Mpc developer meeting will be held in Bordeaux from June 25 to 27, 2012. External participants are very welcome!
Version 0.9, "Epilobium montanum", released in February 2011, comes with the following new features:
-
New functions
-
mpc_set_dc,mpc_set_ldc,mpc_get_dc,mpc_get_ldcfor converting between mpc type variables and C variables of typedouble _Complexorlong double _Complex -
mpc_sin_cos, computing simultaneously the sine and cosine
-
-
Speed-ups
-
mpc_pow_sithrough binary exponentiation -
mpc_pow_zwhen the exponent fits in a long -
mpc_tanthrough the use ofmpc_sin_cos
-
-
Bug fixes
- trigonometric functions: infinite loop due to overflow for large arguments
-
exp: close to infinite loop for argument close to 0 -
sqrt: close to infinite loop for argument close to 1 -
add_si: replaced macro by function, since the macro evaluated the same expression twice
-
Logging feature for debugging
./configure --enable-logging
#include "mpc-log.h"instead of#include "mpc.h" - Minimally required library versions: gmp 4.3.2, mpfr 2.4.2