code wiki / _hdl_build / nx_primitive_miner_gate.nx
nx_primitive_miner_gate.nx
buildroot/runtime/_hdl_build/nx_primitive_miner_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
| 20 | 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 |
| 22 | func slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 23 | func lcg_next(st: *i64) -> i64 { st[0]=((1103515245*st[0])+12345)&2147483647; return st[0] } |
| 24 | func rand_coef(st: *i64) -> i64 { return (0-9)+(lcg_next(st)%19) } |
| 27 | func parse_exps(t: *u8, tlen: i64, out: *i64) -> i64 |
| 46 | func pow_i(i: i64, k: i64) -> i64 { var r: i64=1; var c: i64=0; while c<k { r=r*i; c=c+1 } return r } |
| 47 | func powsum(k: i64, x: i64) -> i64 { var s: i64=0; var i: i64=1; while i<=x { s=s+pow_i(i,k); i=i+1 } return s } |
| 49 | func model(c: *i64, candk: i64, x: i64) -> i64 |
| 54 | func merr(c: *i64, candk: i64, xs: *i64, ys: *i64, n: i64) -> i64 |
| 60 | func fit(candk: i64, xs: *i64, ys: *i64, n: i64, seed: i64, best: *i64) -> i64 |
| 88 | func keep_candidate(candk: i64, xs: *i64, ys: *i64, n: i64) -> i64 |
| 94 | func main() -> i64 |