Changeset 3729 for branches/f4grobner
- Timestamp:
- 2015-09-07T19:41:37-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/symbolic-polynomial.lisp
r3728 r3729 87 87 (t 88 88 (case (car expr) 89 (+ (reduce #' r+(p-eval-list (cdr expr))))90 (- (apply #' r-(p-eval-list (cdr expr))))89 (+ (reduce #'add (p-eval-list (cdr expr)))) 90 (- (apply #'subtract (p-eval-list (cdr expr)))) 91 91 (* 92 92 (if (endp (cddr expr)) ;unary 93 93 (p-eval (cdr expr)) 94 (reduce #' r*(p-eval-list (cdr expr)))))94 (reduce #'multiply (p-eval-list (cdr expr))))) 95 95 (/ 96 96 ;; A polynomial can be divided by a scalar … … 98 98 ((endp (cddr expr)) 99 99 ;; A special case (/ ?), the inverse 100 ( r/(cadr expr)))100 (divide (cadr expr))) 101 101 (t 102 102 (let ((num (p-eval (cadr expr))) 103 (denom-inverse (apply #' r/(mapcar #'p-eval-scalar (cddr expr)))))104 ( r*denom-inverse num)))))103 (denom-inverse (apply #'divide (mapcar #'p-eval-scalar (cddr expr))))) 104 (multiply denom-inverse num))))) 105 105 (expt 106 106 (cond … … 113 113 ;; Non-integer power means non-polynomial coefficient 114 114 expr) 115 (t ( r-expt (p-eval (cadr expr)) (caddr expr)))))115 (t (universal-expt (p-eval (cadr expr)) (caddr expr))))) 116 116 (otherwise 117 117 expr))))))) … … 184 184 (cond 185 185 ((poly-p p) 186 (mapcar #' term->cons(poly-termlist p)))186 (mapcar #'->list (poly-termlist p))) 187 187 ((and (consp p) (eq (car p) :[)) 188 188 (cons :[ (mapcar #'poly->alist (cdr p)))))) … … 193 193 "Convert a string STR representing a polynomial or polynomial list to 194 194 an association list (... (MONOM . COEFF) ...)." 195 (poly->alist (string->poly str vars ringorder)))195 (poly->alist (string->poly str vars order))) 196 196 197 197 (defun poly-equal-no-sugar-p (p q)
Note:
See TracChangeset
for help on using the changeset viewer.