Fast solving of a cubic equation?

i just want to know if of all the existing polynomial root solving packages, there is one that solves cubic equations with the exact formula (cardano’s method)

yes GitHub - giordano/PolynomialRoots.jl: Fast complex polynomial root finder, with support for arbitrary precision calculations

3 Likes

i was looking at the source code an there it was, xD

from the code, the cubic solver isn’t called when using the roots function, but the method is here, and thats all i need to know

does it not call? https://github.com/giordano/PolynomialRoots.jl/blob/196154b7ff97e4310509e1e32290cc80aad83d65/src/PolynomialRoots.jl#L655

from the readme:

roots can be used to solve polynomials of any degree, roots5 is tailored to (and works only for) polynomials of degree 5.

the call is in root5, not in roots, but anyway, i used that function directly

ah, I see what you mean, the solve_cubic_eq routine is not used unless roots5 is called.