code wiki / _hdl_build / nx_math_scorecard.nx
nx_math_scorecard.nx
buildroot/runtime/_hdl_build/nx_math_scorecard.nx
about
nx_math_scorecard.nx -- the NIST-exceed instrument: MECHANICAL DLMF/GAMS coverage
scorecard for the math-engine arc. Evidence-driven-live-grading law: every cell is
derived from knowledge/status/math_engine.log GREEN gate rows; nothing is asserted.
"Better than Wolfram/NIST-listed engines" only ever appears as verdict=NIST-EXCEED,
and that verdict requires EVERY chapter row at target AND a won perf race row --
today's output is the HONEST baseline (verdict=ON-LADDER, tiny coverage).
Data-driven (rule 11): the requirement table is DATA rows (tag, class-id, weight),
growing the engine = adding rows here + gates in the log, never editing logic.
Class ids: 0=ARITH(IEEE754 core) 1=DLMF-ch4(elementary) 2=DLMF-ch5(gamma)
3=DLMF-ch7(erf) 4=DLMF-ch10(bessel) 5=PERF(races won)
Output: MATHSCORE line -> stdout + append knowledge/status/math_scorecard.log
license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_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
| 17 | const MS_MAGIC_262144: i64 = 262144 |
| 18 | const MS_MAGIC_262143: i64 = 262143 |
| 55 | const MS_NROWS: i64 = 17 |
| 56 | const MS_NCLASS: i64 = 6 |
functions
| 20 | func ms_puts(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 } |
| 21 | func ms_putn(fd: i64, v: i64) -> i64 { let bb: *u8 = sys_mmap(28); var m: i64 = v; if m < 0 { m = 0 - m; sys_write(fd, "-" as *u8, 1) }; let t: *u8 = sys_mmap(28); var k: i64 = 0; if m == 0 { t[0] = 48; k = 1 }; while m > 0 { t[k] = 48 + (m % 10); m = m / 10; k = k + 1 }; var i: i64 = 0; while i < k { bb[i] = t[k-1-i]; i = i + 1 }; sys_write(fd, bb, k); return 0 } |
| 25 | func ms_row_tag(i: i64) -> *u8 called by 1: main |
| 46 | func ms_row_class(i: i64) -> i64 called by 1: main |
| 62 | func ms_tag_green(buf: *u8, n: i64, tag: *u8) -> i64 called by 1: main |
| 99 | func main() -> i64 |