Finite fields package



Alasdair,

Thanks for sending the finite fields package. The PDF document is
very helpful and looks good too. I am working my way through the
examples and I am getting some slightly different results.

%o20 and %o21 -- For num2poly(9), I get x^3 + 1 instead of x^3 + x,
and then for gf_ind(%), I get 14 instead of 9.
(But I get gf_exp(x, 9) => x^3 + x and then gf_ind(%) => 9,
so maybe the problem is in num2poly ?? Not sure about that.)

%i22 -- it read a:x^2+1+1 in the PDF. Is it supposed to be a:x^2 + x + 1 ?
The output shown is %o22 = x^2 + x + 1 .

%o30 -- For p:gf_minpoly(a) I get z^4 + z^3 + 1, but the output is
shown as %o30 = z^5 + z^3 + 1 . I also get
gf_eval(subst(a, z, p)) => 0 but (substituting the value shown in %o30)
gf_eval(subst(a, z, z^5 + z^3 + 1)) => x^3 + x + 1 .

%o36 -- The list construction makelist(gf_log(x+i,g),i,0,6); yields a
list with elements like mod(51 false, 160) , apparently because
inv_mod is returning false for a lot of calls, e.g. inv_mod(200, 600)
=> false . That seems correct according to the documentation for
inv_mod, but if that's the case I don't understand how gf_log is
supposed to get the correct result.

If I copy the result shown for %o36 to a , then the rest of the example
through %o45 goes through as shown in the PDF.

%o46 -- with M as shown in %o14 (not %o39), the result I get
for gf_matinv(M) differs in the row 2, column 3 element -- I see
x^3 + 1 instead of x^3 + x + 1 . For gf_matmul(M, MI) I get the
identity matrix as shown, although for gf_matmul(MI, M) I get
matrix([1, 0, 0], [0, 0, 0], [0, 0, 1]) . Is that to be expected?

%o49 -- I get x^8 + x^7 + x^6 + x^5 + x^4 + x^3 + x^2
instead of x^9 + x^7 + x^6 + x^5 + x^4 + x^2 + x .

If I assign the result shown for %o49 to pe, then the gf_nbrep
results shown in %o52 and %o53 are the same as shown in the PDF.

I have tried these examples using current cvs head (i.e. 5.10.0 +
some changes) compiled with sbcl 0.9.16. I think Clisp 2.38
yields the same results, but gcl 2.6.7 differs. I didn't investigate
the gcl differences.

Thanks a lot for posting the gf package. I'm sure we can straighten
out the problems whereever they are (in Maxima, Lisp, gf, or me).

All the best
Robert Dodier