Changeset 3390
- Timestamp:
- 2015-08-27T08:50:06-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/ring.lisp
r3389 r3390 125 125 126 126 (defgeneric r-expt (x y) 127 (:method ((x integer) (y integer)) (expt x y))127 (:method ((x number) (y integer)) (expt x y)) 128 128 (:method ((x t) (y integer)) 129 129 (declare (type fixnum y)) … … 134 134 (do ((k 1 (ash k 1)) 135 135 (q x (r* q q)) ;keep squaring 136 (p 1 (if (not (zerop (logand k y))) (r* (r* p q) p))))136 (p 1 (if (not (zerop (logand k y))) (r* p q) p))) 137 137 ((> k y) p) 138 138 (declare (fixnum k))))))
Note:
See TracChangeset
for help on using the changeset viewer.