close Warning: Can't synchronize with repository "(default)" (The repository directory has changed, you should resynchronize the repository with: trac-admin $ENV repository resync '(default)'). Look in the Trac log for more information.

Changeset 3684 for branches


Ignore:
Timestamp:
2015-09-06T05:49:34-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/polynomial.lisp

    r3683 r3684  
    444444            :initial-value (leading-coefficient self))))
    445445
    446 (defgeneric poly-primitive-part (self)
    447   (:documentation "Divide polynomial SELF by gcd of its
    448 coefficients. Return SELF.")
    449   (:method ((self poly))
    450     (if (universal-zerop object)
    451         (values object 1)
    452         (let ((c (poly-content object)))
    453           (mapc #'(lambda (x)
    454                     (setf (term-coeff x) (divide (term-coeff x) c)))
    455                 (poly-termlist p))))
    456     self))
     446(defun poly-primitive-part (object)
     447  "Non-destructively divide polynomial OBJECT by gcd of its
     448coefficients. Return the resulting polynomial."
     449  (divide-by object (poly-content object)))
    457450
    458451#|
Note: See TracChangeset for help on using the changeset viewer.