OK, but that's not the behavior I'd expect, and it's something that has
to be watched out for constantly. For example, if we use SortBy, I think
that after all the functions have been applied to the list, we're stuck
with this sorting by complexity of expression unless we remember to
apply N to every element of the list together with each of our other
functions.
On Jan 6, 2012, at 5:46 PM, Andrzej Kozlowski wrote:
> Numeric symbols like Sqrt[2],Pi,E etc. etc are not sorted by their
value but in the same way as all other symbols. Compare:
>
> Sort[{Pi, 4, Sqrt[2], 2, 3*E}]
>
> {2, 4, Sqrt[2], 3*E, Pi}
>
> with
>
> Sort[{Pi, 4, Sqrt[2], 2, 3*E}, Less]
>
> {Sqrt[2], 2, Pi, 4, 3*E}
>
>
> Note also that you can use Sort with a custom ordering function.
>
>
> Andrzej Kozlowski