code wiki / _hdl_build / nx_pattern_emit6_demo2.nx

nx_pattern_emit6_demo2.nx source

↩ module page · 23 lines · 874 B

1// nx_pattern_emit6_demo2.nx -- the TEAM authoring f64 sin+cos (no Claude core logic). 2// Spec = _pm_sin_spec.nx, GENERATED SOVEREIGNLY by nx_mathspec_sincos (bigfloat; no python). 3import "nx_pattern_emit6.nx" 4import "_pm_sin_spec.nx" 5import "nx_syscalls.nx" 6 7func p62_w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } 8 9func main() -> i64 { 10 let c: *i64 = sys_mmap(8 * 32) as *i64 11 pm_sin_spec_fill(c) 12 let a: i64 = pe6_author_sincos("_pe_f64sincos.nx" as *u8, 13 "runtime/_hdl_build/_pe_f64sincos.nx" as *u8, 14 "runtime/_hdl_build/_pe_f64sincos_test.nx" as *u8, 15 c) 16 if a == 1 { 17 p62_w("TEAM AUTHORED CORE: _pe_f64sincos (MATH_KERNEL/SINCOS, spec=sovereign bigfloat) -- Engineer verify next\n" as *u8) 18 sys_exit(0) 19 } 20 p62_w("author failed\n" as *u8) 21 sys_exit(1) 22 return 1 23}