Changeset 936
- Timestamp:
- 2015-06-09T19:14:02-07:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/termlist.lisp
r935 r936 195 195 ;; Multiplication of polynomials 196 196 ;; Non-destructive version 197 (defun termlist-mul (ring p q) 198 (declare (ring ring)) 197 (defun termlist-mul (ring-and-order p q 198 &aux 199 (ring (ro-ring ring-and-order)) 200 (order (ro-order ring-and-order))) 201 (declare (ring-and-order ring-and-order)) 199 202 (cond ((or (endp p) (endp q)) nil) ;p or q is 0 (represented by NIL) 200 203 ;; If p=p0+p1 and q=q0+q1 then pq=p0q0+p0q1+p1q … … 205 208 (t 206 209 (let ((head (term-mul-lst ring (termlist-lt p) (termlist-lt q))) 207 (tail (termlist-add ring (term-times-termlist ring (car p) (cdr q)) 208 (termlist-mul ring (cdr p) q)))) 210 (tail (termlist-add ring-and-order 211 (term-times-termlist ring (car p) (cdr q)) 212 (termlist-mul ring-and-order (cdr p) q)))) 209 213 (cond ((null head) tail) 210 214 ((null tail) head)
Note:
See TracChangeset
for help on using the changeset viewer.