code wiki / _hdl_build / nx_pattern_emit6_erf.nx
nx_pattern_emit6_erf.nx
buildroot/runtime/_hdl_build/nx_pattern_emit6_erf.nx
about
nx_pattern_emit6_erf.nx -- PATTERN EMITTER: MATH_KERNEL / ERF_TAYLOR (DLMF ch7 rung 1,
ME2-ERF-001). The Builder authors f64 erf from the SOVEREIGN spec (nx_mathspec_erf:
bf_pi + Newton sqrt, rails held bit-exact vs known-good). The emitter contains
STRUCTURE only -- every number written into the module comes from the spec table c[].
kernel: specials (NaN/+-0 sign-preserved/+-Inf->+-1) -> integer-compare domain cuts
on |x| bits (positive f64 ordering): |x|>=c[37] (6.0) -> +-1 sub-ulp; |x|>c[36]
(1.75) -> NAN_RAW = the RUNG-1 HONEST GAP (erfc route = ME2-ERF-002, named debt;
a wrong number is worse than a loud gap) -> else 32-term signed Horner in z=x*x
(plain f64, the ch4 core gene) -> EXACT two-product x*p (_er_mul2 27-bit-split dd)
-> dd scale by 2/sqrt(pi) (full-bits product + lo-residual tail recombine).
Antisymmetry erf(-x) = -erf(x) is BIT-EXACT by construction (odd path only).
The emitted test checks ALGORITHM INVARIANTS (specials/cuts/antisymmetry) -- the
semantic ULP bar is the Engineer's separate bf-oracle gate (_bf_erf_gate, next).
license_tier: ORIGINAL
dependencies 2 imports · 3 importers
imports: nx_pattern_emit.nxnx_syscalls.nx
imported by: nx_auto_builder.nxnx_auto_builder_s20.nxnx_pattern_emit6_demo7.nx
structs
| none |
consts
| none |
functions
| 18 | func pe6e_wlit(fd: i64, v: i64) -> i64 |
| 28 | func pe6e_mod_head(mf: i64) -> i64 |
| 46 | func pe6_author_erf(modfile: *u8, modpath: *u8, testpath: *u8, c: *i64) -> i64 |