summaryrefslogtreecommitdiff
path: root/math/primes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'math/primes.cpp')
-rw-r--r--math/primes.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/math/primes.cpp b/math/primes.cpp
index 0065939..1694f6a 100644
--- a/math/primes.cpp
+++ b/math/primes.cpp
@@ -22,7 +22,7 @@ ll rho(ll n) { // Findet Faktor < n, nicht unbedingt prim.
x = (multMod(x, x, n) + c) % n;
y = (multMod(y, y, n) + c) % n;
y = (multMod(y, y, n) + c) % n;
- d = __gcd(abs(x - y), n);
+ d = gcd(abs(x - y), n); // Implementierung von oben.
}
return d == n ? rho(n) : d;
}
@@ -34,6 +34,6 @@ void factor(ll n, map<ll, int> &facts) {
return;
}
ll f = rho(n);
- factor(n/f, facts);
+ factor(n / f, facts);
factor(f, facts);
}