On Wed, 29 Apr 2009, Stavros Macrakis wrote:
< See the documentation for 'modulus'.
<
< (%i4) modulus:2;
< (%o4) 2
< (%i5) factor(1 + x + x^2 + x^3 + x^6);
< (%o5) (x^2-x+1)*(-x^4+x^3+1)
<
< I believe it is a bug (though arguably an innocuous one, since -1 ?? 1 mod 2)
< that some of the coefficients of the factored form are negative -- it should
< really be (x^2+x+1)*(x^4+x^3+1).
Apparently, this depends on the underlying lisp, as you can see below.
(%i1) p:1 + x + x^2 + x^3 + x^6;
(%o1) x^6+x^3+x^2+x+1
(%i2) factor(p);
(%o2) x^6+x^3+x^2+x+1
(%i3) modulus:2;
(%o3) 2
(%i4) factor(p);
(%o4) (x^2+x+1)*(x^4+x^3+1)
(%i5) build_info();
Maxima version: 5.18.1
Maxima build date: 14:8 4/20/2009
host type: i686-pc-linux-gnu
lisp-implementation-type: CLISP
lisp-implementation-version: 2.47 (2008-10-23) (built 3448862542)
(memory 3449221717)
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.