From 2af51264dee73108fd57df46609106722ad0ddfc Mon Sep 17 00:00:00 2001 From: mzuenni Date: Fri, 28 Aug 2026 12:18:31 +0200 Subject: resolvew name conflict... --- content/math/legendre.cpp | 2 +- content/math/sqrtModCipolla.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'content') diff --git a/content/math/legendre.cpp b/content/math/legendre.cpp index b85ea2a..80825ea 100644 --- a/content/math/legendre.cpp +++ b/content/math/legendre.cpp @@ -1,4 +1,4 @@ -ll legendre(ll a, ll p) { // p prim >= 2 +ll legendreS(ll a, ll p) { // p prim >= 2 ll s = powMod(a, p / 2, p); return s < 2 ? s : -1ll; } 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) { -- cgit v1.2.3