I like Matlab's version too. It uses the fact that the eigenvalues of the companion matrix (https://en.wikipedia.org/wiki/Companion_matrix) are the roots of the polynomial. So if NotASmurf already has code to find eigenvalues then they are set - the eigenvalue calculator does all of the heavy lifting.

Jason

EDIT: Oops - I failed to look and see that this is a very, very stale thread!