Greatest common divisor: Difference between revisions
Content deleted Content added
added ocaml |
added scheme |
||
Line 351:
<code>gcd_bin(40902, 24140)</code> takes us about '''41''' usec
=={{header|Scheme}}==
(define (gcd a b)
(cond ((= a 0) b)
((= b 0) a)
((> a b) (gcd b (modulo a b)))
(else (gcd a (modulo b a)))))
|