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 2549 for branches


Ignore:
Timestamp:
2015-06-19T16:02:31-07:00 (10 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/polynomial.lisp

    r2545 r2549  
    112112          other
    113113        (do ((p termlist1  (cdr p))
    114              (q termlist2))
     114             (q termlist2)
     115             lm-equal)
    115116            ((endp p)
    116117             ;; Include remaining terms of termlist1
     
    118119          ;; Copy all initial terms of q greater than (lt p) into p       
    119120          (do ((r q (cdr q)))
    120               ((lex> (lt r) (lt p)))
     121              ((multiple-value-bind
     122                     (greater-p equal-p)
     123                   (lex> (lt r) (lt p))
     124                 ;; Save the info about equality of last copied term
     125                 (setf last-equal equal-p)
     126                 greater-p))
    121127            (push (lt r) p))
    122128          ;; Now compare leading terms of p and q
    123129          (cond
    124             ((monom= (lt p) (lt q))
     130            (last-equal
    125131             ;; Simply add coefficients
    126132             (setf (lc p) (add-to (lc p) (lc q)))))))))
Note: See TracChangeset for help on using the changeset viewer.