# Sorting by SortBy without converting to numerical values

First output returned by Sort is correct - ordered from smaller to bigger numbers.

Second output returned by SortBy is correct but only in the sense if FullForm's are sorted, not values.

Third output returned by SortBy is correct - ordered from smaller to bigger number (because N was added in the code).

Fourth output return by SortBy is incorrect - we would need to add more decimal digits like with N[,100].

Sort[{-2, -(2^20 + 1)^(1/20)}, Less]
SortBy[{{-2, 2}, {-(2^20 + 1)^(1/20), 2}}, {#[[2]], #[[1]]} &]
SortBy[{{-2, 2}, {-(2^20 + 1)^(1/20), 2}}, N@{#[[2]], #[[1]]} &]
SortBy[{{-2, 2}, {-(2^50 + 1)^(1/50), 2}}, N@{#[[2]], #[[1]]} &]

(* {-1048577^(1/20),-2} *)
(* {{-2,2},{-1048577^(1/20),2}} *)
(* {{-1048577^(1/20),2},{-2,2}} *)
(* {{-2,2},{-5^(3/50) 9007199254741^(1/50),2}} *)


But now I want to use SortBy the same way like Sort - without converting to numerical values. How to do that?

You can use the three-argument-form of SortBy with NumericalOrder:
SortBy[{{-2, 2}, {-(2^20 + 1)^(1/20), 2}}, {#[[2]], #[[1]]} &, NumericalOrder]