A fast and stable algorithm for splitting polynomials