Skip to content

Commit

Permalink
saving.
Browse files Browse the repository at this point in the history
  • Loading branch information
lemire committed Apr 13, 2024
1 parent 01ceace commit 9edd9db
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions 2013/12/26/gcd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,18 +309,6 @@ unsigned gcd_iterative_mod(unsigned a, unsigned b) {
}
return a;
}
unsigned gcd_mod_faster(unsigned a, unsigned b) {
if (a < b)
std::swap(a, b);

while (b) {
unsigned t = b;
b = a % b;
a = t;
}

return a;
}

// make sure divsor is smaller to possibly save an iteration
unsigned gcd_mod_faster(unsigned a, unsigned b) {
Expand Down

0 comments on commit 9edd9db

Please sign in to comment.