anchor.diff:  	results))))
   
   (defmethod getLinearRoot ((p Polynomial))
  +  "Returns the root of a linear polynomial (degree equals one)."
     (let ((results (make-array 3 :element-type 'float :fill-pointer 0))
   	(a (elt (coefs p) 1)))
       (when (/= 0 a)
  
positive.code: (in-package #:lindsey)
  
  (defconstant TOLERANCE 1e-6)
  (defconstant ACCURACY 6)
  
  (defclass Polynomial ()
    ((coefs :initarg :coefs :accessor coefs)
     (var :initarg :var :accessor var :initform "t")
     (s :initarg :s :accessor s)))
  
  (defmethod init ((p Polynomial) cfs)
    (setf (coefs p) (reverse (copy-seq cfs))))
  
  (defmethod initialize-instance :after ((p Polynomial) &key)
    (init p (coefs p)))
  
  (defmethod evaluate ((p Polynomial) x)
    (assert (numberp x) nil "Polynomial evaluate: parameter must be a number.")
  
    (let ((result 0))
      (loop for i across (coefs p)
         do (setf result (+ (* result x) i)))
      result))
  
  (defmethod degree ((p Polynomial))
    (1- (length (coefs p))))
  
  (defmethod getCubicRoots ((p Polynomial))
    (let ((results (make-array 3 :element-type 'float :fill-pointer 0)))
      (when (= 3 (degree p))
        (let* ((c3 (elt (coefs p) 3))
  
negative.code:     results))
  
  (defmethod simplify ((p Polynomial))
    "Simplify reduces the degree of the polynomial.
  Each monomial, highest degree first, is visited.
  If the absolute value of the monomial's coefficient is below a certain value,
  then the monomial is removed from the polynomial.
  This method is called by the getRoots() method."
    (loop for i from (degree p) downto 0
       do (if (<= (abs (elt (coefs p) i)) TOLERANCE)
  	    (vector-pop (coefs p))
  	    (return))))
  
  (defmethod getRoots ((p Polynomial))
    "getRoots attempts to find the roots of the current polynomial.
  This method will attempt to decrease the degree of the polynomial using the simplify method.
  Once the degree is determined, getRoots() dispatches the appropriate root-finding
  method for the degree of the polynomial.
  
  NOTE: At this time, polynomials above the 4'th degree are not supported."
    (simplify p)
    (case (degree p)
      (0 #())
  