diff options
| author | mzuenni <michi.zuendorf@gmail.com> | 2026-08-28 12:18:31 +0200 |
|---|---|---|
| committer | mzuenni <michi.zuendorf@gmail.com> | 2026-08-28 12:18:31 +0200 |
| commit | 2af51264dee73108fd57df46609106722ad0ddfc (patch) | |
| tree | d04e326cd30de2a8c4f2ad415ed7a2b6b82b2007 /content/math/sqrtModCipolla.cpp | |
| parent | d720779f7039d96f2752a67cb6146a04fc78d062 (diff) | |
resolvew name conflict...
Diffstat (limited to 'content/math/sqrtModCipolla.cpp')
| -rw-r--r-- | content/math/sqrtModCipolla.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/content/math/sqrtModCipolla.cpp b/content/math/sqrtModCipolla.cpp index 1fac0c5..e0037fc 100644 --- a/content/math/sqrtModCipolla.cpp +++ b/content/math/sqrtModCipolla.cpp @@ -1,7 +1,7 @@ -ll sqrtMod(ll a, ll p) {// teste mit legendre ob lösung existiert +ll sqrtMod(ll a, ll p) {// test mit legendreS ob lösung existiert if (a < 2) return a; ll t = 0; - while (legendre((t*t-4*a) % p, p) >= 0) t = rng() % p; + while (legendreS((t*t-4*a) % p, p) >= 0) t = rng() % p; ll b = -t, c = -t, d = 1, m = p; for (m++; m /= 2; b = (a+a-b*b) % p, a = (a*a) % p) { if (m % 2) { |
