Created
November 14, 2014 16:23
-
-
Save dkinzer/e22f438a39df306b34a8 to your computer and use it in GitHub Desktop.
Algorithms in JavaScript.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Euclid's algorithm to determine greatest common divisor. | |
function E_1_1 (m, n) { | |
var r = m % n; | |
if (r == 0) { | |
return n; | |
} | |
return E_1_1(n, r); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment