Refine by-divisor prime test time limits
This commit is contained in:
1 parent
b47e758235
commit
6a1925dd47
9 files changed
+260
-71
No files matched your search
@@ -18,7 +18,8 @@ public static class MersenneNumberDivisorByDivisorTester
|
||||
Action markComposite,
|
||||
Action clearComposite,
|
||||
Action<ulong, bool, bool, bool> printResult,
|
||||
int threadCount)
|
||||
int threadCount,
|
||||
TimeSpan? primeTestLimit)
|
||||
{
|
||||
if (candidates.Count == 0)
|
||||
{
|
||||
@@ -243,7 +244,7 @@ public static class MersenneNumberDivisorByDivisorTester
|
||||
|
||||
void ProcessPrime(ulong prime)
|
||||
{
|
||||
bool isPrime = tester.IsPrime(prime, out bool divisorsExhausted);
|
||||
bool isPrime = tester.IsPrime(prime, out bool divisorsExhausted, primeTestLimit);
|
||||
|
||||
if (!isPrime)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user