code wiki / _hdl_build / nx_f64_rootfind.nx

nx_f64_rootfind.nx

buildroot/runtime/_hdl_build/nx_f64_rootfind.nx

2169 B48 linesdepth 5pulls 7 transitivereach 1 importersview sourcekind librarytopic f64
docsdependenciesstructsconstsfunctions

about

nx_f64_rootfind.nx -- GAMS-F: sovereign nonlinear root-finder (the nonlinear-solve capability class). Robust BISECTION on a sign-changing bracket [a,b] -- guaranteed convergence (1 bit/iter), no derivative needed. The function under test is selected by a function-id (the dialect has no function pointers); rf_eval composes our PROVEN kernels (exp / cos / polynomial), so the root-finder rests only on gated primitives. fid 0: x^2 - 2 (root sqrt2) fid 1: cos(x) - x (Dottie number) fid 2: exp(x) - 2 (root ln2) fid 3: x^3 - x - 2 (root ~1.5214) f64 software-IEEE throughout. (Brent superlinear convergence = the perf-exceed upgrade.) module: nishi-core.math.f64_rootfind depends: nishi-core.math.f64, nishi-core.math.f64_exp, nishi-core.math.f64_sincos capability: F64_ROOTFIND_BISECTION license_tier: ORIGINAL

dependencies 4 imports · 1 importers

nx_syscalls.nx nx_f64.nx nx_f64_exp.nx _pe_f64sincos.nx nx_f64_rootfind.nx _f64_rootfind_gate.nx

imports: nx_syscalls.nxnx_f64.nxnx_f64_exp.nx_pe_f64sincos.nx

imported by: _f64_rootfind_gate.nx

structs

none

consts

21const RF_TWO: i64 = 0x4000000000000000 // 2.0
22const RF_HALF: i64 = 0x3FE0000000000000 // 0.5

functions

24func rf_eval(fid: i64, x: i64) -> i64
34func nx_f64_root_bisect(fid: i64, a: i64, b: i64) -> i64
called by 1: main calls 3: rf_evalnx_f64_mulnx_f64_add