code wiki / _hdl_build / nx_grammar_expand_gate.nx
nx_grammar_expand_gate.nx
buildroot/runtime/_hdl_build/nx_grammar_expand_gate.nx
dependencies 3 imports · 0 importers
imports: nx_gate_gn.nxnx_gate_base.nxnx_syscalls.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
| none |
functions
| 24 | func grow(name: *u8, ok: i64) -> i64 { if ok==1 { gw(" PASS " as *u8) } else { gw(" FAIL " as *u8) } gw(name); gw(" calls 1: gw |
| 26 | func lcg_next(st: *i64) -> i64 { st[0]=((1103515245*st[0])+12345)&2147483647; return st[0] } |
| 27 | func rand_coef(st: *i64) -> i64 { return (0-9)+(lcg_next(st)%19) } // coeff in [-9,9] |
| 30 | func basis(which: i64, x: i64) -> i64 |
| 44 | func model(coeffs: *i64, cand: i64, x: i64) -> i64 |
| 49 | func merr(coeffs: *i64, cand: i64, xs: *i64, ys: *i64, n: i64) -> i64 |
| 55 | func fit(cand: i64, xs: *i64, ys: *i64, n: i64, seed: i64, best: *i64) -> i64 |
| 85 | func gw_cand(c: i64) -> i64 |
| 90 | func main() -> i64 |