code wiki / _hdl_build / nx_atm_trans_gate.nx

nx_atm_trans_gate.nx

buildroot/runtime/_hdl_build/nx_atm_trans_gate.nx

5657 B120 linesdepth 3pulls 6 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_atm_trans_gate.nx -- GATE for the nx_atmosphere transmittance rung (2026-08-26). Accept rule, PRE-DECLARED (before the lib compiled): the i64 march must reproduce the 20,000-sample double-precision reference (computed from the same [bytes] medium table, knowledge/library/sky_volumetrics_impl_spec_2026-08-26.md) within +-64 q16 at four KAT angles; expneg must match exp() KATs; ozone tent endpoints exact; transmittance monotone in mu; and a single-species control must DIVERGE from the KATs, proving they discriminate the full medium. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_atmosphere.nx nx_gate_verdict.nx nx_atm_trans_gate.nx

imports: nx_syscalls.nxnx_atmosphere.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

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_mmap ↻ atm_expneg_q16 xt_abs gv_check gv_puts sys_write ↻ atm_dens_q16 atm_expneg_q16 ↻ xt_kat atm_trans_q16 vm_isqrt atm_dens_q16 ↻ atm_expneg_q16 ↻ gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap xt_abs ↻ atm_trans_q16 ↻ gv_puts ↻ gv_num ↻ atm_bake_sun_lut

structs

none

consts

12const XT_TOL: i64 = 64
14const XT_Z_R: i64 = 61627
15const XT_Z_G: i64 = 56860
16const XT_Z_B: i64 = 49959
17const XT_M5_R: i64 = 57985
18const XT_M5_G: i64 = 49405
19const XT_M5_B: i64 = 38160
20const XT_S_R: i64 = 26627
21const XT_S_G: i64 = 8647
22const XT_S_B: i64 = 1059
23const XT_H_R: i64 = 6975
24const XT_H_G: i64 = 628
25const XT_H_B: i64 = 3

functions

27func xt_abs(v: i64) -> i64 { if v < 0 { return 0 - v } return v }
called by 2: xt_katmain
29func xt_kat(mu_q16: i64, kr: i64, kg: i64, kb: i64, buf: *i64) -> i64
40func main() -> i64