GCD in Forth

Plain Text

Public Domain

Greatest common denominator/divisor function in Forth

Download (right click, save as, rename as appropriate)

Embed

Tags:

Forth GCD math
1
: gcd 2dup < if swap then begin tuck mod dup 0= until drop ;