You could use simp:false or quoted exponentiation ( ' "^"(3,4) ) or various
other tricks, but they tend to be brittle, that is, Maxima won't necessarily
do what you expect in all cases.
With simp:false, you could do:
simp:false$
mylist: [ 100^100, ...]
sort(mylist,"<")
This is dirty because in general you can't count on Maxima to operate
correctly on unsimplified expressions....
If the only kind of expression you care about is of the form a^b, then the
simplest, cleanest solution is probably something like this:
mylist: [ [100,100], [80, 120] ...] $
sort( mylist, lambda([a,b], is( a[1]^a[2] < b[1]^b[2] )) );
The second argument to 'sort' is a predicate. The disadvantages of this
solution are that 1) it doesn't display as exponentials; 2) it doesn't
extend to arbitrary expressions, e.g. [ 3^4-2^2, 2^(2^2-1), ...].
-s
On 6/3/06, Henry Lenzi <henry.lenzi at gmail.com> wrote:
>
> Here's my problem: I want to make a list made of huge numbers. Then,
> I want to sort it. I don't want maxima to expand powers (I want it too
> keep exponential notation, for readability.) Is ther a way?
>
> (%i105) mylist:[100^100, 80^120,60^140,40^160,20^180];
> (%o105) [10000000000000000000000000000000000000000000000000000000000
> (%i106) sort(mylist);
>