gen_hll_bias_nx.nx
buildroot/runtime/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: syscalls.nxsketch_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
| 20 | const NX_GEN_LG_K_MIN: i64 = 4 |
| 21 | const NX_GEN_LG_K_MAX: i64 = 10 |
| 25 | const NX_GEN_N_SAMPLES: i64 = 192 |
| 29 | const NX_GEN_N_SEEDS: i64 = 500 |
| 33 | const NX_GEN_UPPER_MULT: i64 = 10 |
functions
| 37 | func gn_putc(c: i64) -> i64 { |
| 44 | func gn_str(s: *u8, len: i64) -> i64 {
called by 1: main |
| 49 | func gn_i64(n: i64) -> i64 { |
| 73 | func gn_nl() -> i64 { |
| 83 | func nx_hll_raw_estimate(h: *Hll) -> i64 { |
| 100 | func main() -> i64 { |