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 2006 for branches/f4grobner


Ignore:
Timestamp:
2015-06-16T17:28:57-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/pol.lisp

    r2005 r2006  
    127127  (cond
    128128    ((null expr)
    129      (error "Empty expression"))
    130     ((eql expr 0)
    131      ())
     129     ;; Do nothing, nil is a representation of 0
     130     ;; in all polynomial rings
     131     )
    132132    ((member expr vars :test #'equalp)
    133      (let ((pos (position expr vars :test #'equalp)))
    134        (make-poly-variable ring (length vars) pos)))
     133     (let* ((pos (position expr vars :test #'equalp))
     134            (monom (let ((m (make-list (length vars) :initial-element 0)))
     135                     (setf (nth m pos) 1) m)))
     136       (make-instance 'poly :expr (list (cons monom 1)))))
    135137    ((atom expr)
    136138     (scalar->poly ring expr vars))
Note: See TracChangeset for help on using the changeset viewer.