|
From: Wolfgang J. <wje...@us...> - 2002-09-27 02:49:07
|
Update of /cvsroot/maxima/maxima/src In directory usw-pr-cvs1:/tmp/cvs-serv17999 Modified Files: rat3e.lisp Log Message: Fix CONTENT of constant polynomials: content(a,x) should give [a, 1] (or [-a, -1]) and not [1, a]. Note that `a' is here regarded as (constant) polynomial in x with coefficients in Z[a]. Index: rat3e.lisp =================================================================== RCS file: /cvsroot/maxima/maxima/src/rat3e.lisp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- rat3e.lisp 13 Aug 2002 03:10:55 -0000 1.3 +++ rat3e.lisp 27 Sep 2002 02:49:03 -0000 1.4 @@ -438,6 +438,12 @@ (SETQ VARLIST (CDR (LISTIFY NARGS))) (NEWVAR X) (DESETQ (H X . Y) (RATREP* X)) + (unless (atom x) + ;; (CAR X) => gensym corresponding to apparent main var. + ;; MAIN-GENVAR => gensym corresponding to the genuine main var. + (let ((main-genvar (nth (1- (length varlist)) genvar))) + (unless (eq (car x) main-genvar) + (setq x `(,main-genvar 0 ,x))))) (SETQ X (RCONTENT X) Y (CONS 1 Y)) (SETQ H (LIST '(MLIST) |