code wiki / (root) / nx_bigfloat120_atan.nx

nx_bigfloat120_atan.nx

buildroot/runtime/nx_bigfloat120_atan.nx

5083 B141 linesdepth 5pulls 5 transitivereach 4 importersview sourcekind librarytopic bigfloat120
docsdependenciesstructsconstsfunctions

about

nx_bigfloat120_atan.nx -- SOVEREIGN atan oracle on the 120-bit bigfloat. General atan from NO new primitives: the reduction subtracts table angles atan(1/n) (bf_atan_inv -- the Machin organ already blessed inside bf_pi) via the addition formula atan(x) - atan(1/n) = atan((x - 1/n) / (1 + x/n)) choosing n = nearest(1/x) bumped so 1/n <= x: the residual is nonnegative and falls below 1/8 within ~3 rounds from anywhere in [0, 1]; a 30-term Taylor tail finishes (ratio < 2^-6 per term -> truncation < 2^-180). Positive-only core (bigfloat law); signs handled at the f64 boundary. |x| > 1 folds through atan(x) = pi/2 - atan(1/x); atan is total (no refusal). Self-anchor (see _bf_atan_gate_authored): Machin recombination through the GENERAL path reproduces pi, and tan(atan(x)) = x against the blessed bf_sin_r/bf_cos_r organ to < 2^-100 -- no external oracle anywhere. license_tier: ORIGINAL

dependencies 5 imports · 4 importers

nx_syscalls.nx nx_tier.nx nx_bigfloat120.nx nx_bigfloat120_div.nx nx_bigfloat120_trig.nx nx_bigfloat120_atan.nx _bf_atan_gate_authored.nx _f64_atan_gate_authored.nx _f64_atan_gate_emitted.nx nx_mathspec_atan.nx

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

imported by: _bf_atan_gate_authored.nx_f64_atan_gate_authored.nx_f64_atan_gate_emitted.nxnx_mathspec_atan.nx

structs

none

consts

22const K_MAGIC_2047: i64 = 2047

functions

26func bf_atan_taylor(out: *i64, x: *i64) -> i64
57func bf_atan01(out: *i64, xin: *i64) -> i64
111func bf_atan_f64(x: i64) -> i64