Address windowed pow2 review feedback

This commit is contained in:
Marek Lemańczyk committed 2025-10-20 18:37:29 +02:00
1 parent 481d1010e8
commit da6ea25729
9 files changed
+17 -20

No files matched your search

@@ -319,8 +319,6 @@ public sealed class MersenneNumberTester(
private static void LegacyOrderKernel(Index1D index, ulong exponent, ArrayView<UInt128> qs, ArrayView<ulong> orders)
{
UInt128 q = qs[index];
// The legacy kernel already relies on the adaptive PowMod helper, which switches to the windowed pow2
// ladder for large divisors.
UInt128 pow = exponent.PowMod(q);
orders[index] = pow == 1UL ? exponent : 0UL;
}