code wiki / _hdl_build / nx_mathspec_gamma.nx

nx_mathspec_gamma.nx

buildroot/runtime/_hdl_build/nx_mathspec_gamma.nx

5509 B137 linesdepth 8pulls 10 transitivereach 0 importersview sourcekind tooltopic mathspec
docsdependenciesstructsconstsfunctions

about

nx_mathspec_gamma.nx -- SOVEREIGN SPEC EMITTER for the GAMMA kernel (DLMF ch5 rung 1, ME2-GAMMA-001). Constants from the 120-bit bigfloat; no python, no minimax: Stirling coefficients c_k = B_2k / ((2k)(2k-1)) from the EXACT Bernoulli table (the sinhcosh P_k gene), signs (-1)^(k+1) BAKED; half*ln(2*pi) via bf_pi + bf_ln; recurrence pull-up target W=8; overflow cut 171.625; reflection (x<0.5) = RUNG-2 NAMED DEBT (LOUD-NAN contract, the erf gap gene). REFUSAL RAILS (rail the ORACLE the future gate will use -- algebra beats trust): R1: bf_gamma_f64(5.0) == 24.0 BIT-EXACT (0x4038000000000000) R2: bf_gamma_f64(0.5) == sqrt(pi) BIT-EXACT (0x3FFC5BF891B4EF6A -- the constant independently Newton-derived and libm-verified earlier this same day) Layout: c[0]=one c[1]=half c[2]=half_ln2pi c[3]=W(8.0) c[4]=overflow_cut(171.625) c[5..12]=Stirling c_k hi-first k=8..1 (SIGNED) c[13]=lo_cut(0.5) Emits runtime/_hdl_build/_pm_gamma_spec.nx :: pm_gamma_spec_fill(c)->14 license_tier: ORIGINAL

dependencies 7 imports · 0 importers

nx_syscalls.nx nx_pattern_emit.nx nx_bigfloat120.nx nx_bigfloat120_div.nx nx_bigfloat120_trig.nx nx_bigfloat120_ln.nx nx_bigfloat120_gamma.nx nx_mathspec_gamma.nx

imports: nx_syscalls.nxnx_pattern_emit.nxnx_bigfloat120.nxnx_bigfloat120_div.nxnx_bigfloat120_trig.nxnx_bigfloat120_ln.nxnx_bigfloat120_gamma.nx

imported by: nobody (leaf or entry point)

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

main bf_gamma_f64 bf_new sys_mmap bf_set_f64 bfg_gamma_pos bf_new ↻ bf_set_int bf_copy bf_cmp bf_is_zero bf_mul bf_is_zero ↻ bf_copy ↻ sys_mmap ↻ bf_add bf_is_zero ↻ bf_copy ↻ sys_mmap ↻ bf_shr2 bf_norm bfg_lngamma_big bf_new ↻ bf_set_int ↻ bf_copy ↻ bf_sub bf_is_zero ↻ bf_copy ↻ sys_mmap ↻ bf_shr2 ↻ bf_norm ↻ bfg_ln_big bf_new ↻ bf_copy ↻ bf_set_int ↻ bf_cmp ↻ bf_sub ↻ bf_add ↻ bf_div bf_is_zero ↻

structs

none

consts

22const K_MAGIC_1373: i64 = 1373
23const K_MAGIC_2730: i64 = 2730
24const K_MAGIC_3617: i64 = 3617

functions

26func msg_wlit(fd: i64, v: i64) -> i64
called by 1: msg_emit_row calls 2: pe_wpe_wn
36func msg_emit_row(fd: i64, idx: i64, v: i64) -> i64
called by 1: main calls 3: pe_wpe_wnmsg_wlit
44func msg_ck(out: *i64, bnum: i64, bden: i64, k: i64) -> i64
54func main() -> i64