Changeset 4373 for branches/f4grobner
- Timestamp:
- 2016-06-06T19:49:20-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/ring.lisp
r4354 r4373 78 78 (:documentation "Solves the diophantine system: X=C*X1, Y=C*X2, 79 79 C=GCD(X,Y). It returns three values: C, X1 and Y1. The result may be obtained by 80 the Euclidean algorithm.")) 80 the Euclidean algorithm.") 81 (:method ((x t) (y t) &aux (c (universal-gcd x y))) 82 (values c (divide x c) (divide y c)))) 81 83 82 84 (defgeneric universal-equalp (self other) … … 99 101 should be returned upon every call.")) 100 102 103 (defun add (summand &rest more-summands) 104 "Successively Adds to SUMMAND the elements of MORE-SUMMANDS. The first SUMMAND must not be destructively modified. 105 Instead, a copy of factor should be made and returned as the value of 106 this function." 107 (:method ((summand t) &rest more-summands) 108 (reduce #'add-to more-summands :initial-value (copy-instance summand)))) 109 101 110 (defgeneric multiply (factor &rest more-factors) 102 111 (:documentation "Successively multiplies factor FACTOR by the remaining arguments
Note:
See TracChangeset
for help on using the changeset viewer.