gcd problem / really bignums for exponents



>
> OK, here's the choice. Making factorization (and other computations using
> canonical polynomials) n% slower,


Perhaps it would make it easier to decide if we can measure n....

Oh, by the way, factoring a polynomial of degree n using Berlekamp's
> algorithm, as used by Maxima, probably requires allocating an array of
> numbers modulo k>n  of size n X n.  So you can't do it unless you can
> store
> at least 4 x n x n bytes.


Factorization is not the only use of polynomials.  In general
representation, Maxima can correctly calculate expand( (x^2^40+1)^2  ).
Alas, rat(%) => 3*x^2+1 with no warning or error message.

If (as someone has suggested) he was going to edit code so that f+ is
> replaced by +, I oppose this.  If he wants to make a compile-time flag to
> optionally redefine the f+ macro to expand to generic +,


This is the right way to do it -- except it shouldn't be f+ itself (which
may be being used legitimately in some other case, e.g. array subscripting),
but cref+ or something.

As for the speed issue, there may be easy ways to fix it.  I don't know how
fixnums and f+ work on the various Lisps we run on (are fixnums allocated on
the heap, or encoded in the Lisp object itself?), but I remember making a
very very simple change in MacLisp many years ago which special-cased the
fixnum+fixnum case of generic + and sped up CRE calculations globally by a
measurable amount (15%, from memory).  Believe it or not, in those days,
memory was so scarce (and the aesthetic of programming opposed to
special-casing) that we didn't incorporate the extra 15 words of code into
the production system.

             -s