nx_gen_hll_bias_nx.nx
buildroot/runtime/nx_gen_hll_bias_nx.nx
about
gen_hll_bias_nx.nx -- generate HLL bias table by running OUR HLL.
SOVEREIGN-SUBSTRATE DISCIPLINE: prior generator used Python's
getrandbits(64) and Python's idealized HLL math. That calibrated
the bias table to PYTHON, not to our actual murmur3-based HLL.
This generator runs OUR HLL on synthetic streams, collecting the
raw alpha*m^2/sum_q32 directly from our register array.
Output: writes hll_bias_table.nx-compatible const block to stdout.
Caller redirects to runtime/hll_bias_table.nx.
Caller args (compile-time consts here -- substrate has no argv yet):
lg_k_min, lg_k_max -- range of lg_k to generate tables for
n_samples -- sample points per lg_k across (threshold, 5m]
n_seeds -- HLL trials per sample point
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_sketch_hll.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 25 | const NX_MAGIC_100000: i64 = 100000 |
| 27 | const NX_GEN_LG_K_MIN: i64 = 4 |
| 28 | const NX_GEN_LG_K_MAX: i64 = 10 |
| 32 | const NX_GEN_N_SAMPLES: i64 = 192 |
| 36 | const NX_GEN_N_SEEDS: i64 = 500 |
| 40 | const NX_GEN_UPPER_MULT: i64 = 10 |
functions
| 44 | func gn_putc(c: i64) -> i64 |
| 51 | func gn_str(s: *u8, len: i64) -> i64 |
| 56 | func gn_i64(n: i64) -> i64 |
| 80 | func gn_nl() -> i64 |
| 90 | func nx_hll_raw_estimate(h: *Hll) -> i64 |
| 107 | func main() -> i64 |