code wiki / (root) / fx_exp_test.nx

fx_exp_test.nx

buildroot/runtime/fx_exp_test.nx

2838 B61 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind gate/prooftopic fx
docsdependenciesstructsconstsfunctions

about

fx_exp_test.nx -- KAT for the fixed-point base-2 exponential family (fx_exp2 / fx_exp10 / fx_expe / fx_pow), the inverse of fx_log2. Run via the sovereign native lane: _offc/nx_compile_x86_native.elf fx_exp_test.nx > t.s as t.s -o t.o && ld -o t.elf t.o && ./t.elf ; echo $? Exit 0 = all assertions PASS; exit N = assertion N failed. Powers of two are EXACT; irrationals/round-trips are bounded (the fixed-point algorithm is deterministic, so the band is a tight correctness window, not a fudge factor). Prints the key values first.

dependencies 2 imports · 0 importers

fx.nx nx_syscalls.nx fx_exp_test.nx

imports: fx.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main _emit sys_mmap sys_write fx_exp2 fx_exp2_frac fx_mul fx_exp2_factor fx_log2 fx_mul ↻ fx_exp10 fx_exp2 ↻ fx_mul ↻ fx_pow fx_exp2 ↻ fx_mul ↻ fx_log2 ↻ sys_mmap ↻ sys_write ↻ within fx_expe fx_exp2 ↻ fx_mul ↻

structs

none

consts

none

functions

15func within(a: i64, b: i64, tol: i64) -> i64
called by 1: main
21func _emit(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
31func main() -> i64