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


Ignore:
Timestamp:
2016-06-06T13:02:31-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/polynomial.lisp

    r4337 r4338  
    622622
    623623
    624 (defun poly-eval (expr vars order)
     624(defun poly-eval (expr vars order &optional (coefficient-ring 'rational-field))
    625625  "Evaluate Lisp form EXPR to a polynomial or a list of polynomials in
    626626variables VARS. Return the resulting polynomial or list of
     
    638638       (let ((pos (position expr vars :test #'equalp)))
    639639         (make-poly-variable (length vars) pos)))
    640       ((integerp expr)
    641        (make-poly-constant (length vars) (make-instance 'integer-ring :value expr)))
    642       ((rationalp expr)
     640      ((numberp expr)
    643641       (make-poly-constant (length vars) (make-instance 'rational-field :value expr)))
    644642      ((eq (car expr) +list-marker+)
Note: See TracChangeset for help on using the changeset viewer.