code wiki / _hdl_build / nx_pattern_emit6_demo8.nx

nx_pattern_emit6_demo8.nx source

↩ module page · 22 lines · 906 B

1// nx_pattern_emit6_demo8.nx -- the TEAM authoring f64 gamma (no Claude core logic). 2// Spec = _pm_gamma_spec.nx (sovereign bigfloat); template = GAMMA_STIRLING (validated 3// dd lnGamma, max_ulp=2). 4import "nx_pattern_emit6_gamma.nx" 5import "_pm_gamma_spec.nx" 6import "nx_syscalls.nx" 7func p68_w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } 8func main() -> i64 { 9 let c: *i64 = sys_mmap(8 * 40) as *i64 10 pm_gamma_spec_fill(c) 11 let a: i64 = pe6_author_gamma("_pe_f64gamma.nx" as *u8, 12 "runtime/_hdl_build/_pe_f64gamma.nx" as *u8, 13 "runtime/_hdl_build/_pe_f64gamma_test.nx" as *u8, 14 c) 15 if a == 1 { 16 p68_w("TEAM AUTHORED CORE: _pe_f64gamma (MATH_KERNEL/GAMMA_STIRLING dd, spec=sovereign bigfloat) -- Engineer verify next\n" as *u8) 17 sys_exit(0) 18 } 19 p68_w("author failed\n" as *u8) 20 sys_exit(1) 21 return 1 22}