## What is MPSolve?

MPSolve stands for **Multiprecision Polynomial SOLVEr**. It is a software that aims to provide an easy to use (hopefully) universal blackbox for solving polynomials and secular equations.

Among its features you can find:

- Arbitrary precision approximation.
- Guaranteed inclusion radii for the results.
- Exploiting of polynomial structures: it can take advantage of sparsity as well as coefficients in a particular domain (i.e. integers or rationals).
- It can be specialized for specific classes of polynomials. As an example, see the roots of the Mandelbrot polynomial of degree 2.097.151 computed in about 10 days on a dual Xeon server.

If you have installed MPSolve you can read the documentation to see how to specify polynomials.

If you use MPSolve in your research, please cite it as follows:

Bini, Dario A., Fiorentino, Giuseppe, *Design, analysis, and implementation of a multiprecision polynomial rootfinder*. Numerical Algorithms 23.2-3 (2000): 127-173.

Bini, Dario A., and Robol, Leonardo. *Solving secular and polynomial equations: A multiprecision algorithm*. Journal of Computational and Applied Mathematics 272 (2014): 276-292.

## How do I get it?

The easiest way to use MPSolve is to use a prebuilt binary version.

- Packages for Ubuntu can be installed with the following commands:

sudo apt-add-repository ppa:leo.robol/mpsolve sudo apt-get update && sudo apt-get install xmpsolve mpsolve

Additional modules (such as Octave and Python bindings) can be installed with the packages `octave-mpsolve`

and `python-mpsolve`

.

- An installer for
**Windows**can be downloaded from the Downloads page.

The latest release is version 3.2.1: mpsolve-3.2.1.tar.bz2,mpsolve-3.2.1.tar.gz. The installer for Windows can be downloaded as well: setupmpsolve-3.2.1.exe. If you want to checkout the latest (possibly not working or untested) version, you can use git from the official Github repository:

git clone git://github.com/robol/MPSolve.git

You can grab the older release tarballs on the Downloads page.

MPSolve should be compilable on all the operating systems that provide a C99 compiler (or a C compiler with minimal C99 semantics) and which can run GMP. If you grab the archive file of the latest release you can build and install MPSolve following these steps:

tar xvf mpsolve-x.y.z.tar.gz cd mpsolve-x.y.z ./configure make sudo make install sudo ldconfig

where `x.y.z`

stands for the version of MPSolve that you have downloaded. You may want to skip the last command if you don’t want to install the package on the machine or simply don’t have administrator privileges. In that case you can use `./src/mpsolve/mpsolve`

in place of the `mpsolve`

command that you find in the documentation.

For more advanced instructions on how to build MPSolve, see the page Building MPSolve.

## Usage examples

MPSolve ships with an executable file, called `mpsolve`

(or `mpsolve.exe`

, depending if you are using Microsoft Windows or not) that can be used to solve polynomials given a file that represent their coefficients.

Some example polynomials can be found in the directory `src/tests/unisolve/`

while some secular equations can be found in `src/tests/secsolve`

. For further documentation on how to write an input file, see the section on Polynomial Files.

Once you have the pol file, you can solve it by calling

mpsolve my.pol

or, if you wish to use the secular algorithm,

mpsolve -as my.pol

Other options for MPSolve can be used to tweak the resolution settings, such as the number of digits required in the output and desired target to reach before stopping (i.e. isolate the roots, approximate the roots or count the roots). A list of all the possible options can be seen with the command `mpsolve -h`

.

## Graphical interface

From version 3.1.0 MPSolve has a graphical user interface that you can use launching the command `xmpsolve`

, or `./src/xmpsolve/xmpsolve`

from the source folder. Note that the user interface will be built only if you have the required development packages, namely libqt4-dev or libqt5.