Changeset 3635 for branches/f4grobner
- Timestamp:
- 2015-09-05T20:36:33-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/5am-poly.lisp
r3508 r3635 69 69 ;; so it will be automatically sorted. 70 70 (dolist (x '( ((2) . 22) ((4) . 44) ((5) . 55) ((8) . 88) ((9) . 99) )) 71 (poly-insert-term p (make-instance ' monom :exponents (car x)) (cdr x)))71 (poly-insert-term p (make-instance 'term :exponents (car x) :coeff (cdr x)))) 72 72 (dolist (x '( ((9) . 90) ((0) . 11) ((2) . 20) ((3) . 33) ((4) . -44) ((7) . 77) ((8) . 88) )) 73 (poly-insert-term q (make-instance ' monom :exponents (car x)) (cdr x)))73 (poly-insert-term q (make-instance 'term :exponents (car x) :coeff (cdr x)))) 74 74 ;; P+Q 75 75 (dolist (x '(((0) . 11) ((2) . 42) ((3) . 33) ((5) . 55) ((7) . 77) ((8) . 176) ((9) . 189) )) 76 (poly-insert-term p+q (make-instance ' monom :exponents (car x)) (cdr x)))76 (poly-insert-term p+q (make-instance 'term :exponents (car x) :coeff (cdr x)))) 77 77 ;; P-Q 78 78 (dolist (x '(((0) . -11) ((2) . 2) ((3) . -33) ((4) . 88) ((5) . 55) ((7) . -77) ((9) . 9))) 79 (poly-insert-term p-q (make-instance ' monom :exponents (car x)) (cdr x)))79 (poly-insert-term p-q (make-instance 'term :exponents (car x) :coeff (cdr x)))) 80 80 ;; -P 81 81 (dolist (x '( ((2) . -22) ((4) . -44) ((5) . -55) ((8) . -88) ((9) . -99))) 82 (poly-insert-term p-uminus (make-instance ' monom :exponents (car x)) (cdr x)))82 (poly-insert-term p-uminus (make-instance 'term :exponents (car x) :coeff (cdr x)))) 83 83 ;;(print p) (print q) (print p+q) (print p-q) 84 84 (&body))) … … 101 101 ;; so it will be automatically sorted. 102 102 (dolist (x '( ((0) . 1) ((1) . 2) )) 103 (poly-insert-term p (make-instance ' monom :exponents (car x)) (cdr x)))103 (poly-insert-term p (make-instance 'term :exponents (car x)) (cdr x))) 104 104 (dolist (x '( ((0) . 1) ((1) . 3) )) 105 (poly-insert-term q (make-instance ' monom :exponents (car x)) (cdr x)))105 (poly-insert-term q (make-instance 'term :exponents (car x)) (cdr x))) 106 106 ;; P*Q 107 107 (dolist (x '( ((0) . 1) ((1) . 5) ((2) . 6))) 108 (poly-insert-term p*q (make-instance ' monom :exponents (car x)) (cdr x)))108 (poly-insert-term p*q (make-instance 'term :exponents (car x)) (cdr x))) 109 109 (&body))) 110 110
Note:
See TracChangeset
for help on using the changeset viewer.