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 4354


Ignore:
Timestamp:
2016-06-06T17:39:43-07:00 (8 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/ring.lisp

    r4352 r4354  
    2828           "MULTIPLY-BY"
    2929           "DIVIDE-BY"
     30           "MULTIPLY"
     31           "DIVIDE"
    3032           "UNARY-MINUS"
    3133           "UNARY-INVERSE"
     
    104106    (reduce #'multiply-by more-factors :initial-value (copy-instance factor))))
    105107
     108
     109(defgeneric divide (numerator &rest denominators)
     110  (:documentation "Successively divides NUMERATOR by elements of DENOMINATORS. The operation
     111should not modify the NUMERATOR. Instead, a copy of factor should be made and returned as the value of this function.")
     112  (:method ((numerator t) &rest denominators)
     113    (cond ((endp denominators)
     114           (unary-inverse (copy-instance numerator)))
     115          (t (reduce #'divide-by denominators :initial-value (copy-instance numerator))))))
     116
Note: See TracChangeset for help on using the changeset viewer.