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


Ignore:
Timestamp:
2015-06-10T12:51:48-07:00 (10 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/polynomial.lisp

    r1117 r1118  
    281281            ((endp (cddr expr))
    282282             ;; A special case (/ ?), the inverse
    283              (apply (ring-div ring) (cdr expr)))
     283             (coerce-coeff ring (apply (ring-div ring) (cdr expr))))
    284284            ((endp (cdddr expr))
    285285             (let ((num (p-eval (cadr expr)))
     
    287287               (scalar-times-poly ring denom-inverse num)))
    288288            (t
    289              (let ((num (p-eval (cons '* (cdr (butlast expr)))))
    290                    (denom (p-eval-scalar (cons '/ (last expr)))))
    291                (cons num denom)))))
     289             (let ((num (p-eval (cadr expr)))
     290                   (denom-inverse (funcall (ring-div ring) (p-eval-scalar (cons '* (cddr expr))))))
     291               (scalar-times-poly ring denom-inverse num)))))
    292292         (expt
    293293          (cond
Note: See TracChangeset for help on using the changeset viewer.