You can see my answer to the corresponding question . I support Olivier's point of view: the way to go can be just an accompanying matrix / approach based on eigenvalues (very stable, simple, reliable and fast).
Edit
I think this will not hurt if I reproduce the answer here, for convenience:
The numerical solution for this many times in a reliable, stable way includes: (1) Forms a matrix of companions, (2) we find the eigenvalues of the matrix of related ones.
You might think that solving this problem is more difficult than the original, but this is how the solution is implemented in most production codes (for example, Matlab).
For polynomial:
p(t) = c0 + c1 * t + c2 * t^2 + t^3
companion matrix:
[[0 0 -c0],[1 0 -c1],[0 1 -c2]]
Find the eigenvalues of such a matrix; they correspond to the roots of the original polynomial.
To do this, load the routines of singular values from LAPACK very quickly, compile them and bind them to your code. Do this in parallel if you have too many (say, about a million) sets of odds. You can use a QR decomposition or any other stable methodology to calculate eigenvalues (see Wikipedia entry “Matrix eigenvalues”).
Please note that the coefficient at t^3 is equal to one, if this is not the case in your polynomials, you will need to divide everything by a coefficient and then continue.
Good luck.
Edit: Nump and octave also depend on this methodology for computing the roots of polynomials. See, for example, this link .