improve the stability of cubic root finder