code wiki / (root) / nx_bigfloat120_exp.nx

nx_bigfloat120_exp.nx

buildroot/runtime/nx_bigfloat120_exp.nx

4103 B125 linesdepth 4pulls 4 transitivereach 20 importersview sourcekind librarytopic bigfloat120
docsdependenciesstructsconstsfunctions

about

nx_bigfloat120_exp.nx -- SOVEREIGN exp oracle: binary64-in, binary64-out, all internals 120-bit bigfloat, EVERY constant self-computed (no mpmath, no python): ln2 = 2 * atanh(1/3) = 2 * (1/3 + (1/3)^3/3 + (1/3)^5/5 + ...) [39 odd terms] Range reduction k = nearest(x / ln2) is taken in bigfloat; r = |x - k*ln2| with the sign handled by the reciprocal trick (exp(-r) = 1/exp(r)) so the Taylor series sums positive terms only. 30 terms: r <= ln2/2 gives a 2^-122 tail. license_tier: ORIGINAL

dependencies 4 imports · 13 importers

nx_syscalls.nx nx_tier.nx nx_bigfloat120.nx nx_bigfloat120_div.nx nx_bigfloat120_exp.nx _bf_gamma_gate_authored.nx _bf_pow_gate_authored.nx _bf_regen_gate_authored.nx _bf_sinhcosh_gate_authored.nx _f64_pow_gate_authored.nx _f64_sinhcosh_gate_authored.nx _pw_probe.nx nx_bigfloat120_gamma.nx nx_bigfloat120_ln.nx nx_bigfloat120_pow.nx

diagram shows first 10 each side; +0 more imports, +3 more importers in the complete lists below.

imports: nx_syscalls.nxnx_tier.nxnx_bigfloat120.nxnx_bigfloat120_div.nx

imported by: _bf_gamma_gate_authored.nx_bf_pow_gate_authored.nx_bf_regen_gate_authored.nx_bf_sinhcosh_gate_authored.nx_f64_pow_gate_authored.nx_f64_sinhcosh_gate_authored.nx_pw_probe.nxnx_bigfloat120_gamma.nxnx_bigfloat120_ln.nxnx_bigfloat120_pow.nxnx_bigfloat120_sinh.nxnx_mathspec_pow.nxnx_mathspec_sinhcosh.nx

structs

none

consts

13const K_MAGIC_2047: i64 = 2047
14const K_MAGIC_1033: i64 = 1033

functions

17func bf_ln2(out: *i64) -> i64
46func bf_exp_f64(x: i64) -> i64