There is currently a unit test for each kind of polynomial. They are all based on setting
up the polynomial coefficients for known roots and checking the obtained root accuracies
from the respective root solvers. The unit tests try to stress test the root solvers by
setting up polynomials which are hard to solve. Two measures are used for judging accuracy
of the roots obtained. The relative accuracy of a root is defined as
This test solves quadratic polynomials with extreme coefficients involving
the largest positive number and the smallest postive number
representable on the
machine under the working precision (for double precision we would have
and
). All possible combinations are tested. We examine only
the
combination in detail. The four quadratic
polynomials are:
![]() |
![]() |
![]() |
(33.9) |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
0 | ![]() |
![]() |
![]() |
0 | ![]() |
![]() |
![]() |
![]() |
0 |
![]() |
![]() |
![]() |
0 |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
The following set of cubic polynomials I-IX is used for the test. It corresponds to the set
used in xxx and represents difficult to solve cases that stress test the cubic solver. In
Tables 33.1 and 33.2 we list all the coefficients, analytical
roots and FLASH4 cubic solver accuracy performance of these polynomials. The polynomials
were designed to be tested with double precision machine working precision.
Cubic | Roots | Comments on Roots | Accuracy |
I | ![]() ![]() ![]() |
3 widely spaced real |
![]() |
II | ![]() ![]() ![]() |
3 closely spaced real |
![]() |
III | ![]() ![]() ![]() |
3 large real |
![]() |
IV | ![]() ![]() ![]() |
1 large, 2 small real |
![]() |
V | ![]() ![]() ![]() |
2 degenerate large, 1 small real |
![]() |
VI | ![]() ![]() |
3 closely spaced, small imag parts |
![]() |
VII | ![]() ![]() |
1 small real, 2 large complex, large imag parts |
![]() |
VIII | ![]() ![]() |
1 small real, 2 large complex, small imag parts |
![]() |
IX | ![]() ![]() |
1 large real, 2 small complex |
![]() |
Again the set of quartic polynomials I-XIII have been taken from xxx. Tables 33.3 and
33.4 list all the coefficients, analytical roots and FLASH4 quartic solver accuracy
performance of these polynomials. The polynomials were designed to be tested with double precision machine
working precision.
Quartic | Roots | Comments on Roots | Accuracy |
I | ![]() ![]() ![]() ![]() |
4 widely spaced real |
![]() |
II | ![]() ![]() ![]() ![]() |
4 closely spaced real |
![]() |
III | ![]() ![]() ![]() ![]() |
4 large real |
![]() |
IV | ![]() ![]() ![]() ![]() |
1 large, 3 small real |
![]() |
V |
![]() ![]() ![]() ![]() |
2 large, 2 small real |
![]() |
VI | ![]() ![]() ![]() |
2 large real, 2 small complex |
![]() |
VII | ![]() ![]() ![]() |
2 small real, 2 large complex |
![]() |
VIII | ![]() ![]() ![]() |
1 large and small real, 2 medium complex |
![]() |
IX |
![]() ![]() |
2 large, 2 small complex |
![]() |
X |
![]() ![]() |
4 complex, mixed size real and imag parts |
![]() |
XI |
![]() ![]() |
4 closely spaced complex |
![]() |
XII |
![]() ![]() |
4 complex, equal real, small imag parts |
![]() |
XIII |
![]() ![]() |
4 complex, small real, large imag parts |
![]() |