Am 4 Jun 2006 um 11:09 hat Robert Dodier geschrieben:
> Hi Henry,
>
> > (%i105) mylist:[100^100, 80^120,60^140,40^160,20^180];
>
> Well, arithmetic expressions are computed via simplification.
> So part of a solution for you might be to turn off simplification.
>
> simp : false;
> mylist:[100^100, 80^120,60^140,40^160,20^180];
> sort (mylist);
> => [20^180, 40^160, 60^140, 80^120, 100^100]
>
Hi Robert,
floating the above result shows that the answer isn't correct.
(%i1) float( [20^180, 40^160, 60^140, 80^120, 100^100], fpprec:1 );
(%o1) [1.5E+234, 2.1E+256, 8.7E+248, 2.3E+228, 1.E+200]
I am not sure if sorting does work correctly without simplification.
Another example:
(%i2) simp:false$
(%i3) [10^5,2^8,2^32];
5 8 32
(%o3) [10 , 2 , 2 ]
(%i4) sort(%);
8 32 5
(%o4) [2 , 2 , 10 ]
In this case the result is wrong too. Without simplification this seems to be sorted like
(%i5) sort( [[10,5],[2,8],[2,32]] );
(%o5) [[2, 8], [2, 32], [10, 5]]
Volker