Next: , Previous: , Up: ENT Basics   [Contents][Index]


63.1.4 The MPC library

MPC is a portable library written by Andreas Enge for arbitrary-precision arithmetic on complex numbers. It is based on the GMP and MPFR libraries.

The MPC library is released under the GNU LGPL and is available at http://www.lix.polytechnique.fr/Labo/Andreas.Enge/mpc/mpc.html.

Unfortunately, as of November 2005, the build system of MPC is extremely poor, hence we describe shortly how to install it. After untarring the archive invoke ‘make’. This will produce a libmpc.a. Copy this file to your favourite lib/ directory, for example /path/to/gmp/prefix/lib/ and make that path known to SXEmacs via the ‘--with-site-prefixes’ switch when configuring. Secondly, copy the file mpc.h to your favourite include/ directory, for example to /path/to/gmp/prefix/include/. That’s it!

The name MPC is probably derived from the mathematical symbol C for the complex number field. Without further explanations, the complex numbers are an algebraic extension of the real numbers, indeed it is the only sensible extension. It turns out, that efforts to find an algebraic closure of any number field end up in the complex numbers.

Complex numbers have different representations, but one of the most known is the representation as a tuple of reals (more formally as vector space over R). The notation of a complex number for this representation is ‘(a,b)’ or ‘a+bi’, where ‘a’ and ‘b’ are real numbers. The symbol ‘i’ denotes the imaginary unit. In this representation, we refer to ‘a’ as the real part and to ‘b’ as the imaginary part of ‘a+bi’.

There are other representations of complex numbers which are not implemented yet and hence will not be explained at this place.


Next: , Previous: , Up: ENT Basics   [Contents][Index]