Re: Dilbert, the Next Generation

On Fri, 17 Nov 1995, Larry Masinter wrote:

> gif! gif!

http://sunsite.unc.edu/ses/dogbert.gif

(defun modexpt (x y n)  "computes (x^y) mod n"
  (cond ((= y 0) 1)  ((= y 1) (mod x n))
	((evenp y) (mod (expt (modexpt x (/ y 2) n) 2) n))
	(t (mod (* x (modexpt x (1- y) n)) n))))

Received on Friday, 17 November 1995 18:41:50 UTC