In solve_poly_inequality, the real roots of a polynomial are sorted.
In order to avoid a type error, sympy.core.compatibility.ordered should be used
for sorting.