# MPSolve output

## Output format

The output format is mainly controlled by the -Ox command line option as follows (here re and im denote real and imaginary parts of the root, respectively):
• -Oc  stands for compact form: (re, im) . This is the default output format.
• -Ob  stands for bare format: re \tab im.
• -Og  stands for gnuplot format: re  im. Low precision suitable for input for gnuplot
• -Ov  stands for verbose form: Root(i) = re ± I im.
• -Of stands for full form: (re, im), Error_Bound, Status

## Output conventions

In order to give the user as much information as possible, the numbers MPSolve outputs are formatted according to the following rules: (in the following din and dout stand for the given input precision and the requested output precision)
• For infinite precision input, i.e., for din = 0, the program delivers a list of complex numbers represented with at most dout digits. For each number, the displayed digits coincide with the digits of the corresponding roots of the input polynomial p(x). The number of displayed digits reaches (or even may slightly exceed) the maximum value dout only for those roots that coincide at least in the first dout digits. Otherwise it is displayed a number of digits sufficient to provide Newton-isolate approximations of the roots. That is, the number of digits is large enough to separate each root from the others and to guarantee the quadratic convergence of Newton's iteration right from the start when applied to the output approximation. For instance, for the polynomial having the following 5 roots 1.11111111, 1.12222222, 1.1233333, 1/3, 1/3, and for the parameters din = 0 and  dout = 30, the program would output the numbers:

• (1.111, 0.0) (1.1222, 0.0) (1.12333, 0.0) (0.333333333333333333333333333333, 0.0) (0.333333333333333333333333333333, 0.0).
• For input with a finite precision (din>0) the program delivers a list of complex numbers having at most dout digits as in the case of infinite precision. For each number z in this list there exists a polynomial q(x) in the neighborhood of p(x) (i.e. the set of polynomials with coefficients having din common digits with the corresponding coefficients of p(x)) such that q(z)=0. Moreover any polynomial in the neighborhood of p(x) has a root which coincides with z in the displayed digits. Each root of p(x) has its corresponding approximation in the list.
• In certain cases it may happen that the relative error bound of the computed approximations is greater than 1, i.e., there is no correct bit in the output. This situation typically occurs, when the imaginary (or real) part of a nonzero root is zero or is such that its ratio with the real (imaginary) part has modulus less than 10-dout. In this case the program outputs 0.0exx, where xx is the exponent of the approximation of this number. Therefore, an output like (1.234, 0.0e-1000) means that the imaginary part, if nonzero, has a modulus less than 10-1000. This lack of information is typical in numerical computation when we have to deal with 0. Anyway, for polynomials having coefficients with infinite precision, it is easy to overcome this lack of information by using auxiliary information of the input like the reality or integrality of the coefficients. This is performed automatically with the option -Dx, where 'x' may be r (real detect) i (imaginary detect) or b (both real and imaginary detect). More options are also available (see the options page).
The uncertainty about the zero output is present also in the case of polynomial having approximate input coefficients. In fact, it may happen that the root neighborhood of p(x) intersects zero. In this case the program outputs 0.0 for those approximations belonging to the connected component of the root neighborhood that intersects zero. However, this (nonzero) approximations are reported integrally in the standard error if the -d (debug) switch is set .

## Status of the approximations

The status of each approximation is also output when the full output is requested with the -Of option (see the options page).

The status of a root is formed by three characters:

• The first character may take the following values:
• m: multiple root
• i: isolated root
• a: approximated single root (relative error less than 10-dout)
• o: approximated cluster of roots (relative error less than 10-dout)
• c: cluster of roots not yet approximated (relative error greater than 10-dout)
• The second character may take the following values
• R: real root
• r: non-real root
• I: imaginary root
• i: non-imaginary root
• w: uncertain real/imaginary root
• z: non-real and non-imaginary root
• The third character may take the following values
• i: root in the set S
• o: root out of S
• u: root uncertain

home