gcd   scheme


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/runtime/init.xtm

Implementation

(define (gcd a b)
  (let ((aa (abs a))
        (bb (abs b)))
    (if (= bb 0)
        aa
        (gcd bb (remainder aa bb)))))


Back to Index