Extension methods benchmarked. Slower alternatives replaced.

This commit is contained in:
Marek Lemańczyk committed 2025-09-23 22:01:09 +02:00
1 parent 9becb8df67
commit 6e99ee39e3
40 files changed
+930 -1026

No files matched your search

+1 -1
View File
@@ -203,7 +203,7 @@ public sealed class MersenneNumberTester(
{
// Safe early rejections using known orders for tiny primes:
// 7 | M_p iff 3 | p. Avoid rejecting p == 3 where M_3 == 7 is prime.
if (exponent.Mod3() == 0UL && exponent != 3UL)
if ((exponent % 3UL) == 0UL && exponent != 3UL)
{
return false;
}