nx_targetfit_gate.nx
buildroot/runtime/nx_targetfit_gate.nx
about
nx_targetfit_gate.nx -- proves the target-conformance ruler: bands, normalisation, abstention, drift.
EVERY EXPECTED VALUE BELOW IS HAND arithmetic OVER THE PUBLISHED pg_bound TABLE, so a tooth that
fails is either a ruler bug or a DELIBERATE bounds change -- and going RED on a bounds change is a
feature, not brittleness: the plausible envelopes are supposed to move only by measurement, and a
conformance ruler whose normalisation base moved deserves a red until someone re-adjudicates it.
THE ONE TOOTH THAT JUSTIFIES THE WHOLE ORGAN IS T4: the SAME 55 mm miss reads 100 permil on total
height and 647 permil on breast projection -- a shrug on one axis, a different body on the other.
A percent-of-target ruler calls those equal. That is the commensurability the envelope
normalisation buys, proven in one line of arithmetic.
dependencies 5 imports · 0 importers
imports: nx_syscalls.nxnx_canon_proportions.nxnx_proportion_guard.nxnx_targetfit.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
| 21 | const TG_ENV_HEIGHT: i64 = 550 |
| 22 | const TG_ENV_BPROJ: i64 = 85 |
| 23 | const TG_ENV_HIP: i64 = 180 |
| 24 | const TG_ENV_SHOULDER: i64 = 170 |
| 25 | const TG_TGT_HEIGHT: i64 = 1700 |
| 26 | const TG_TGT_HIP: i64 = 370 |
| 27 | const TG_TGT_SHOULDER: i64 = 380 |
| 28 | const TG_TGT_BPROJ: i64 = 60 |
| 30 | const TG_MISS_TIGHT: i64 = 11 // 11*1000/550 = 20 -> TIGHT |
| 31 | const TG_MISS_SLIGHT: i64 = 55 // 55*1000/550 = 100 -> SLIGHT |
| 32 | const TG_MISS_HIP_EDGE: i64 = 27 // 27*1000/180 = 150 -> SLIGHT, exactly on the edge |
| 33 | const TG_MISS_SH_EDGE: i64 = 51 // 51*1000/170 = 300 -> MODERATE, exactly on the edge |
| 34 | const TG_MISS_SH_OUT: i64 = 120 // 120*1000/170 = 705 -> OUTSIDE |
| 35 | const TG_AXIS_UNKNOWN: i64 = 999 // no pg_bound row exists for this id |
| 36 | const TG_N4: i64 = 4 |
functions
| 38 | func tg_arr(n: i64) -> *i64 { return sys_mmap(n * 8) as *i64 } |
| 39 | func tg_eq(a: i64, b: i64) -> i64 { if a == b { return 1 } return 0 } called by 1: main |
| 40 | func tg_zero(a: i64) -> i64 { if a == 0 { return 1 } return 0 } called by 1: main |
| 41 | func tg_pos(a: i64) -> i64 { if a > 0 { return 1 } return 0 } called by 1: main |
| 42 | func tg_eq2(a: i64, b: i64, c: i64, d: i64) -> i64 { if a == b { if c == d { return 1 } } return 0 } called by 1: main |
| 43 | func tg_eq3(a: i64, b: i64, c: i64, d: i64, e: i64, f: i64) -> i64 called by 1: main |
| 47 | func main() -> i64 |