Characterizations of the Optimal Descartes' Rules of Signs