Toggle navigation
Extempore Functions Index
Core release (v0.8.9)
(current)
XTM Extensions
About
Submit
hidden link
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