code wiki / (root) / nx_bigfloat120_erfc.nx

nx_bigfloat120_erfc.nx

buildroot/runtime/nx_bigfloat120_erfc.nx

5161 B148 linesdepth 5pulls 5 transitivereach 4 importersview sourcekind librarytopic bigfloat120
docsdependenciesstructsconstsfunctions

about

nx_bigfloat120_erfc.nx -- ME2-ERF-002 FOUNDATION rung: the SOVEREIGN 120-bit erfc oracle for the 1.75..6 range the erf Taylor series cannot reach (the LOUD-NAN gap the erf rung-1 contract named). No python, no minimax, no external oracle -- and it is PROVABLE by algebra alone (erf(x)+erfc(x)=1), so no trusted reference is imported. Method = the Laplace continued fraction (the classic erfc CF, converges for x>0, fast for x>=1.5): erfc(x) = (exp(-x^2)/sqrt(pi)) * 1/(x + (1/2)/(x + (2/2)/(x + (3/2)/(x + ...)))) partial numerators a_k = k/2, partial denominators all = x. Evaluated by backward recurrence from depth N (t=0; for k=N..1: t = a_k/(x+t); CF = 1/(x+t)). exp(-x^2) = 1/exp(x^2); exp(x^2) by DIRECT Taylor (all-positive, x^2<=36 -> the N=160 tail is < 2^-150 relative, no range-reduction needed); sqrt(pi) by Newton. bf_erf here is the SAME 44-term Taylor the trusted erf gate uses, but returns a bigfloat (not f64-rounded) so the gate can check erf+erfc==1 at full precision. All values POSITIVE-magnitude (the bf core convention); erfc and erf are positive on the tested domain so no sign bookkeeping is needed. Composes only proven core ops. module: nishi-core.math.bigfloat120_erfc depends: nishi-core.math.bigfloat120, nishi-core.math.bigfloat120_div, nishi-core.math.bigfloat120_trig capability: SOVEREIGN_ERFC_ORACLE_120BIT license_tier: ORIGINAL

dependencies 4 imports · 4 importers

nx_syscalls.nx nx_bigfloat120.nx nx_bigfloat120_div.nx nx_bigfloat120_trig.nx nx_bigfloat120_erfc.nx _bf_erfc_oracle_gate.nx _f64_erf_full_gate.nx _f64_erfc_gate.nx _f64_igammaq_gate.nx

imports: nx_syscalls.nxnx_bigfloat120.nxnx_bigfloat120_div.nxnx_bigfloat120_trig.nx

imported by: _bf_erfc_oracle_gate.nx_f64_erf_full_gate.nx_f64_erfc_gate.nx_f64_igammaq_gate.nx

structs

none

consts

none

functions

29func bfc_exp(out: *i64, v: *i64) -> i64
53func bfc_sqrt(out: *i64, a: *i64, seed_raw: i64) -> i64
70func bf_erfc(out: *i64, xb: *i64) -> i64
110func bf_erf(out: *i64, xb: *i64) -> i64