From cf4b381136961c321eb0e2140a954a74341d5f2c Mon Sep 17 00:00:00 2001 From: mzuenni Date: Fri, 28 Aug 2026 14:05:25 +0200 Subject: also rename in tsts --- test/math/legendre.cpp | 4 ++-- test/math/sqrtModCipolla.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/math/legendre.cpp b/test/math/legendre.cpp index 44f88c1..c828302 100644 --- a/test/math/legendre.cpp +++ b/test/math/legendre.cpp @@ -11,7 +11,7 @@ void stress_test() { vector isSquare(p); for (ll j = 1; j < p; j++) isSquare[(j*j) % p] = true; for (ll j = 0; j < p; j++) { - auto got = legendre(j, p); + auto got = legendreS(j, p); auto expected = j == 0 ? 0 : (isSquare[j] ? 1 : -1); if (got != expected) cerr << "error: " << j << " " << p << FAIL; } @@ -28,7 +28,7 @@ void performance_test() { for (int operations = 0; operations < N; operations++) { ll j = Random::integer(mod); t.start(); - hash += legendre(j, mod); + hash += legendreS(j, mod); t.stop(); } if (t.time > 750) cerr << "too slow: " << t.time << FAIL; diff --git a/test/math/sqrtModCipolla.cpp b/test/math/sqrtModCipolla.cpp index c7be9a4..0d7de70 100644 --- a/test/math/sqrtModCipolla.cpp +++ b/test/math/sqrtModCipolla.cpp @@ -10,7 +10,7 @@ void stress_test(ll range) { ll p = Random::prime(range); for (ll j = 0; j < 100; j++) { ll x = Random::integer(0, p); - if (legendre(x, p) < 0) continue; + if (legendreS(x, p) < 0) continue; ll got = sqrtMod(x, p); if (got < 0 || got >= p) cerr << "error: out of range" << FAIL; @@ -30,7 +30,7 @@ void performance_test() { ll x; do { x = Random::integer(0, mod); - } while (legendre(x, mod) >= 0); + } while (legendreS(x, mod) >= 0); t.start(); hash += sqrtMod(x, mod); t.stop(); -- cgit v1.2.3