code wiki / _hdl_build / _f64_erf_gate_authored.nx

_f64_erf_gate_authored.nx

buildroot/runtime/_hdl_build/_f64_erf_gate_authored.nx

5762 B132 linesdepth 5pulls 9 transitivereach 0 importersview sourcekind tooltopic f64
docsdependenciesstructsconstsfunctions

about

_f64_erf_gate_authored.nx -- f64 EDGE gate for the Builder-authored erf (component 5). Complements the bf oracle gate (semantics) with IEEE edge discipline: E1 denormal in -> finite, sign-preserved, non-NaN (series path: x*p well-defined) E2 monotone non-decreasing over 0.5..1.75 step 1/256 (no Horner wiggle at the top) E3 gap contract: first bits ABOVE the 1.75 cut -> NAN_RAW (loud, never wrong-number) E4 result strictly < 1.0 inside the series domain (erf(1.75)=0.98667...) E5 SEMANTIC ANCHORS (the tamper judge's teeth -- RUNGRUN re-runs THIS gate after flipping a kernel literal, so edge checks alone are blind to coefficient/scale flips that preserve monotonicity): 8-point bf-oracle ULP<=4 at x=k/8, k=1..8, with 2/sqrt(pi) re-derived INDEPENDENTLY (judge diversity, not shared spec). Durable: F64ERF row -> knowledge/status/math_engine.log. Exit 0 iff all held. license_tier: ORIGINAL

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_bigfloat120.nx nx_bigfloat120_div.nx nx_bigfloat120_trig.nx _pe_f64erf.nx _f64_erf_gate_authored.nx

imports: nx_syscalls.nxnx_bigfloat120.nxnx_bigfloat120_div.nxnx_bigfloat120_trig.nx_pe_f64erf.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main fg_p sys_write nx_f64_erf nx_f64_classify nx_f64_exp_field nx_f64_mant_field nx_f64_mul nx_f64_classify ↻ nx_f64_sign nx_f64_mant_field ↻ nx_f64_exp_field ↻ _f64_round_pack nx_f64_add nx_f64_classify ↻ nx_f64_sign ↻ nx_f64_mant_field ↻ nx_f64_exp_field ↻ _f64_round_pack ↻ sys_mmap _er_mul2 nx_f64_sub nx_f64_add ↻ nx_f64_neg nx_f64_mul ↻ nx_f64_add ↻ bf_new sys_mmap ↻ bf_pi bf_new ↻ bf_atan_inv bf_new ↻ bf_set_int bf_div_small bf_is_zero bf_copy bf_norm bf_mul bf_is_zero ↻ bf_copy ↻

structs

none

consts

none

functions

18func fg_p(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
19func fg_f(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 }
called by 1: main calls 1: sys_write
20func fg_n(fd: i64, v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m; sys_write(fd,"-" as *u8,1)}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48 as u8;k=1}; while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(fd,bb,k); return 0 }
called by 1: main calls 2: sys_mmapsys_write
21func fg_sqrt(out: *i64, a: *i64, seed_raw: i64) -> i64
35func fg_oracle(xbits: i64, tosp: *i64) -> i64
63func main() -> i64