[math] Fix quartic polynomial solver.