code wiki / _hdl_build / nx_f64_quad.nx

nx_f64_quad.nx

buildroot/runtime/_hdl_build/nx_f64_quad.nx

2274 B55 linesdepth 5pulls 8 transitivereach 1 importersview sourcekind librarytopic f64
docsdependenciesstructsconstsfunctions

about

nx_f64_quad.nx -- GAMS-H: sovereign numerical QUADRATURE (the integration class). Composite Simpson's rule (O(h^4)) over a sign... over a function-id dispatch (no fn pointers in the dialect); qf_eval composes our PROVEN kernels (x^2 / sin / exp / 1/x). integral_a^b f dx ~= h/3 [ f0 + 4(f1+f3+..) + 2(f2+f4+..) + fn ], h=(b-a)/n, n even. f64 software-IEEE; node x_i = a + i*h built from an exact integer-as-f64 (no drift). (Gauss-Legendre / adaptive Gauss-Kronrod = the accuracy/perf upgrade -- its nodes are Legendre roots, computable by composing the new nx_f64_rootfind.) module: nishi-core.math.f64_quad depends: nishi-core.math.f64, nishi-core.math.f64_exp, nishi-core.math.f64_sincos capability: F64_QUADRATURE_SIMPSON license_tier: ORIGINAL

dependencies 5 imports · 1 importers

nx_syscalls.nx nx_f64.nx nx_f64_div.nx nx_f64_exp.nx _pe_f64sincos.nx nx_f64_quad.nx _f64_quad_gate.nx

imports: nx_syscalls.nxnx_f64.nxnx_f64_div.nxnx_f64_exp.nx_pe_f64sincos.nx

imported by: _f64_quad_gate.nx

structs

none

consts

19const Q_ONE: i64 = 0x3FF0000000000000 // 1.0
20const Q_TWO: i64 = 0x4000000000000000 // 2.0
21const Q_THREE: i64 = 0x4008000000000000 // 3.0
22const Q_FOUR: i64 = 0x4010000000000000 // 4.0

functions

24func qf_eval(fid: i64, x: i64) -> i64
32func qf_i2f(k: i64) -> i64
called by 1: nx_f64_quad_simpson calls 1: nx_f64_add
40func nx_f64_quad_simpson(fid: i64, a: i64, b: i64, n: i64) -> i64