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 2016 for branches/f4grobner


Ignore:
Timestamp:
2015-06-17T15:06:55-07:00 (10 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/ring.lisp

    r2015 r2016  
    9292(defgeneric ring-unit-for (object)
    9393  (:method ((self number)) 1))
     94
     95(defgeneric ring-zerop (object)
     96  (:method ((self number)) (zerop self)))
     97
     98(defgeneric ring-add (x y)
     99  (:method ((x number) (y number)) (+ x y)))
     100
     101(defgeneric ring-mul (x y)
     102  (:method ((x number) (y number)) (* x y)))
     103
     104(defgeneric ring-div (x y)
     105  (:method ((x number) (y number)) (/ x y)))
     106
     107(defgeneric ring-lcm (x y)
     108  (:method ((x integer) (y integer)) (lcm x y)))
     109
     110(defgeneric ring-ezgcd (x y)
     111  (:method ((x integer) (y integer)
     112            &aux (c (gcd x y)))
     113    (values c (/ x c) (/ y c))))
Note: See TracChangeset for help on using the changeset viewer.