Changeset 4119 for branches/f4grobner
- Timestamp:
- 2016-06-01T14:01:41-07:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/polynomial.lisp
r4117 r4119 455 455 (defun add (summand &rest more-summands) 456 456 "Successively Adds to SUMMAND the elements of MORE-SUMMANDS." 457 (reduce #'add-to summands :initial-value summand))457 (reduce #'add-to more-summands :initial-value summand)) 458 458 459 459 (defun subtract (minuend &rest subtrahends) … … 591 591 (polysaturation-extension f (list p))) 592 592 593 (defmethod multiply-by ((object1 number) (object2 poly))594 (scalar-multiply-by (copy-instance object2) object1))595 596 (defmethod multiply-by ((object1 poly) (object2 number))597 (scalar-multiply-by (copy-instance object1) object2))593 ;; (defmethod multiply-by ((object1 number) (object2 poly)) 594 ;; (scalar-multiply-by (copy-instance object2) object1)) 595 596 ;; (defmethod multiply-by ((object1 poly) (object2 number)) 597 ;; (scalar-multiply-by (copy-instance object1) object2)) 598 598 599 599 (defun make-poly-variable (nvars pos &optional (power 1)) … … 614 614 (do ((k 1 (ash k 1)) 615 615 (q x (multiply q q)) ;keep squaring 616 (p 1(if (not (zerop (logand k y))) (multiply p q) p)))616 (p (make-unit-for x) (if (not (zerop (logand k y))) (multiply p q) p))) 617 617 ((> k y) p) 618 618 (declare (fixnum k)))))))
Note:
See TracChangeset
for help on using the changeset viewer.