On 4/1/20 20:03, Giovanni Mascellani wrote:
Il 01/04/20 18:46, Paul Gofman ha scritto:
Given the complex roots are not needed here and
the polynomial is always
cubic, is this generic method really beneficial? It would probably be
simpler and quicker to find one root x1 with simple bisection, then
divide the polynomial into (x - x1) and deal with remaining quadratic
equation.
This kind of division is typically numerically unstable. It might be
that for cubic polynomials the problem is not very apparent,
Yes, factoring out the roots from a high degree polynomial can
accumulate the error, but how's that a problem for just one root?
Also, I think just using double precision in analytical solution will
avoid any practical stability problems in this case.