by vog · 12y ago · 0 comments
Edit: Also, if you stick to the original subtraction-based version of the algorithm, why adding that other optimization? That wasn't part of the original algorithm, either. This seems to be double standard.
gcd(a, b) = gcd(b, a mod b),
and there is no need to compute mod with anything other than %.https://github.com/felipernb/algorithms.js/commit/e5a04f9ad0...