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 1005


Ignore:
Timestamp:
2015-06-10T06:24:33-07:00 (10 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/parse.lisp

    r1004 r1005  
    7575is a number then convert it to a polynomial in N variables."
    7676  (if (numberp number-or-poly)
    77       (make-poly-from-termlist (list (make-term (make-monomial :dimension n) number-or-poly)))
     77      (make-poly-from-termlist (list (make-term (make-monom :dimension n) number-or-poly)))
    7878      number-or-poly))
    7979
    80 (defun $poly+ (p q n order ring)
     80(defun $poly+ (ring-and-order p q n)
    8181  "Add two polynomials P and Q, where each polynomial is either a
    8282numeric constant or a polynomial in internal representation. If the
    8383result is a number then convert it to a polynomial in N variables."
    84   (poly+ (convert-number p n) (convert-number q n) order ring))
    85 
    86 (defun $poly- (p q n order ring)
     84  (poly-add ring-and-order (convert-number p n) (convert-number q n)))
     85
     86(defun $poly- (ring-and-order p q n)
    8787  "Subtract two polynomials P and Q, where each polynomial is either a
    8888numeric constant or a polynomial in internal representation. If the
    8989result is a number then convert it to a polynomial in N variables."
    90   (poly- (convert-number p n) (convert-number q n) order ring))
    91 
    92 (defun $minus-poly (p n ring)
     90  (poly-sub ring-and-order (convert-number p n) (convert-number q n)))
     91
     92(defun $minus-poly (ring p n)
    9393  "Negation of P is a polynomial is either a numeric constant or a
    9494polynomial in internal representation. If the result is a number then
    9595convert it to a polynomial in N variables."
    96   (minus-poly (convert-number p n) ring))
     96  (poly-uminus ring (convert-number p n)))
    9797
    9898(defun $poly* (p q n order ring)
Note: See TracChangeset for help on using the changeset viewer.