NumericalOrder
NumericalOrder[e1, e2] gives 1 if e1 < e2, -1 if e1 > e2, 0 if e1 and e2 are numerically the same, and orders by type or using canonical order if e1 and e2 are not numerically comparable.
Examples
NumericalOrder[3.5, 2.1]NumericalOrder[Pi, 3.14]Please visit the official Wolfram Language Reference for more details.