code wiki / _hdl_build / nx_intlog_gate.nx
nx_intlog_gate.nx
buildroot/runtime/_hdl_build/nx_intlog_gate.nx
about
nx_intlog_gate.nx -- KAT gate for the integer log2 / IDF / tf-saturation primitives (the BM25 rung's
math floor) and the S1 crossover side. Exact on powers of two, tight (+-2/1024) between them, monotonic,
overflow-safe at the top of the domain, the derived idf/tfsat behaviors the ranking depends on, and the
corpus-scale side decision with its planted-other-side control. MIGRATED onto nx_gate_verdict 2026-09-14:
/api/promote refused the hand-rolled verdict (D001) because nothing outside the gate could read it.
license_tier: ORIGINAL expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_intlog.nxnx_gate_verdict.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
| 10 | const GI_CROSSOVER_TOKENS: i64 = 10000000 // the published crossover the conf carries, planted here as the threshold |
| 11 | const GI_ONE_UNDER: i64 = 9999999 // one token under the crossover reads BELOW |
| 12 | const GI_WEB_TOKENS: i64 = 376066000 // a web-sized corpus, far above |
| 13 | const GI_TWICE: i64 = 20000000 // twice the crossover, the planted other side |
| 14 | const GI_ONE_TOKEN: i64 = 1 // a one-token corpus, the planted BELOW |
| 15 | const GI_UNMEASURED: i64 = 0 // an unmeasured corpus or threshold |
functions
| 17 | func main() -> i64 |