- Timestamp:
- 2015-06-19T16:02:31-07:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/polynomial.lisp
r2545 r2549 112 112 other 113 113 (do ((p termlist1 (cdr p)) 114 (q termlist2)) 114 (q termlist2) 115 lm-equal) 115 116 ((endp p) 116 117 ;; Include remaining terms of termlist1 … … 118 119 ;; Copy all initial terms of q greater than (lt p) into p 119 120 (do ((r q (cdr q))) 120 ((lex> (lt r) (lt p))) 121 ((multiple-value-bind 122 (greater-p equal-p) 123 (lex> (lt r) (lt p)) 124 ;; Save the info about equality of last copied term 125 (setf last-equal equal-p) 126 greater-p)) 121 127 (push (lt r) p)) 122 128 ;; Now compare leading terms of p and q 123 129 (cond 124 ( (monom= (lt p) (lt q))130 (last-equal 125 131 ;; Simply add coefficients 126 132 (setf (lc p) (add-to (lc p) (lc q)))))))))
Note:
See TracChangeset
for help on using the changeset viewer.