We'll output to console not only primes, but also composites. Output to console standardized on ConsoleInterval

This commit is contained in:
Marek Lemańczyk committed 2025-09-21 12:56:30 +02:00
1 parent 9a054542e6
commit 458cb77227
3 files changed
+237 -240

No files matched your search

+1 -3
View File
@@ -15,8 +15,6 @@ internal static class Program
private static ThreadLocal<MersenneNumberTester> MersenneTesters = null!;
private static ThreadLocal<ModResidueTracker> PResidue = null!; // p mod d tracker (per-thread)
private const ulong InitialP = PerfectNumberConstants.BiggestKnownEvenPerfectP;
private const int ConsoleInterval = 100_000;
private const int WriteBatchSize = 100;
private const string DefaultCyclesPath = "divisor_cycles.bin";
private static string ResultsFileName = "even_perfect_bit_scan_results.csv";
@@ -887,7 +885,7 @@ internal static class Program
lock (Sync)
{
if (_consoleCounter >= ConsoleInterval)
if (_consoleCounter >= PerfectNumberConstants.ConsoleInterval)
{
printToConsole = true;
primeFlag = passedAllTests && !lastWasComposite && _primeFoundAfterInit;