modify _nsort and move to polyutils
solve_univariate_inequality is denominator-aware