I will see if I can get an Alberth method function written without too much difficulty and test it out, maybe run some speed tests between the two.
Also, I guess I should switch over to doubles then as well. I'll see if that makes any differences.
On Wed, Apr 1, 2020 at 1:14 PM Paul Gofman gofmanp@gmail.com wrote:
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.