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, but given that Aberth method doesn't look that difficult to me to implement, I would go for that one. Also, I think that the Aberth method, being a variation on Newton's method, is much quicker than bisection.
That said, I don't have much time to write code right now, so I won't get in the way of those who are. Just a suggestion.
Giovanni.