code wiki / _hdl_build / _bf_atan_gate_authored.nx

_bf_atan_gate_authored.nx

buildroot/runtime/_hdl_build/_bf_atan_gate_authored.nx

6537 B160 linesdepth 6pulls 6 transitivereach 0 importersview sourcekind tooltopic bf
docsdependenciesstructsconstsfunctions

about

_bf_atan_gate_authored.nx -- self-anchor gate for the SOVEREIGN bigfloat atan oracle (nx_bigfloat120_atan). No external oracle anywhere: 1. MACHIN: 16*atan01(1/5) - 4*atan01(1/239) through the GENERAL reduction path must reproduce bf_pi to < 2^-108. 2. TAN-ROUNDTRIP: tan(atan(x)) = x at 200 banded-random f64 points in (0,1) + fixed boundary points, tan from the BLESSED bf_sin_r/bf_cos_r organ (itself anchored by Machin-vs-Gauss + sin^2+cos^2), rel < 2^-100. 3. f64 specials: NaN, +-0, +-inf -> +-fl(pi/2), oddness, monotone continuity across x = 1 (branch seam) and x = 1/8 (Taylor seam). Markers: BFATAN-MACHIN / BFATAN-TAN / BFATAN-SPEC / BFATAN-GATE verdict=

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_bigfloat120.nx nx_bigfloat120_div.nx nx_bigfloat120_trig.nx nx_bigfloat120_atan.nx _bf_atan_gate_authored.nx

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

imported by: nobody (leaf or entry point)

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

main bf_new sys_mmap bf_set_int bf_div_small bf_is_zero bf_copy bf_norm bf_atan01 bf_is_zero ↻ bf_copy ↻ bf_new ↻ bf_set_int ↻ bf_cmp bf_is_zero ↻ bf_pi bf_new ↻ bf_atan_inv bf_new ↻ bf_set_int ↻ bf_div_small ↻ bf_mul bf_is_zero ↻ bf_copy ↻ sys_mmap ↻ bf_copy ↻ bf_add bf_is_zero ↻ bf_copy ↻ sys_mmap ↻ bf_shr2 bf_norm ↻ bf_sub bf_is_zero ↻ bf_copy ↻ sys_mmap ↻ bf_shr2 ↻ bf_norm ↻ bf_sub ↻ bf_div

structs

none

consts

none

functions

18func bag_puts(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 bag_putn(v: i64) -> i64 { let bb: *u8 = sys_mmap(28); var m: i64 = v; if m < 0 { m = 0 - m; sys_write(1, "-" as *u8, 1) }; let t: *u8 = sys_mmap(28); var k: i64 = 0; if m == 0 { t[0] = 48; k = 1 }; while m > 0 { t[k] = 48 + (m % 10); m = m / 10; k = k + 1 }; var i: i64 = 0; while i < k { bb[i] = t[k-1-i]; i = i + 1 }; sys_write(1, bb, k); return 0 }
called by 1: main calls 2: sys_mmapsys_write
20func bag_puthex(v: i64) -> i64 { let bb: *u8 = sys_mmap(20); var i: i64 = 0; while i < 16 { let nib: i64 = (v >> ((15 - i) * 4)) & 15; if nib < 10 { bb[i] = 48 + nib } else { bb[i] = 55 + nib } i = i + 1 } sys_write(1, bb, 16); return 0 }
called by 1: main calls 2: sys_mmapsys_write
22func bag_rng(state: *i64) -> i64
called by 1: main
32func bag_relok(a: *i64, b: *i64, bits: i64) -> i64
41func bag_tan_rt(xb: *i64) -> i64
53func main() -> i64