code wiki / _hdl_build / nx_pattern_emit6_demo9.nx

nx_pattern_emit6_demo9.nx source

↩ module page · 25 lines · 993 B

1// nx_pattern_emit6_demo9.nx -- the TEAM authoring f64 erfc (no Claude core logic). 2// Spec = _pm_erfc_spec.nx, GENERATED SOVEREIGNLY by nx_mathspec_erfc (1/sqrt(pi) rail 3// held bit-exact vs known-good). Fills the const table, then the ERFC_CF pattern 4// emitter writes the kernel + invariant test. 5import "nx_pattern_emit6_erfc.nx" 6import "_pm_erfc_spec.nx" 7import "nx_syscalls.nx" 8 9func p69_w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } 10 11func main() -> i64 { 12 let c: *i64 = sys_mmap(8 * 8) as *i64 13 pm_erfc_spec_fill(c) 14 let a: i64 = pe6_author_erfc("_pe_f64erfc.nx" as *u8, 15 "runtime/_hdl_build/_pe_f64erfc.nx" as *u8, 16 "runtime/_hdl_build/_pe_f64erfc_test.nx" as *u8, 17 c) 18 if a == 1 { 19 p69_w("TEAM AUTHORED CORE: _pe_f64erfc (MATH_KERNEL/ERFC_CF, spec=sovereign 1/sqrt(pi)) -- Engineer verify next\n" as *u8) 20 sys_exit(0) 21 } 22 p69_w("author failed\n" as *u8) 23 sys_exit(1) 24 return 1 25}