code wiki / _hdl_build / nx_f64_quad.nx
nx_f64_quad.nx
buildroot/runtime/_hdl_build/nx_f64_quad.nx
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
imports: nx_syscalls.nxnx_f64.nxnx_f64_div.nxnx_f64_exp.nx_pe_f64sincos.nx
imported by: _f64_quad_gate.nx
structs
| none |
consts
| 19 | const Q_ONE: i64 = 0x3FF0000000000000 // 1.0 |
| 20 | const Q_TWO: i64 = 0x4000000000000000 // 2.0 |
| 21 | const Q_THREE: i64 = 0x4008000000000000 // 3.0 |
| 22 | const Q_FOUR: i64 = 0x4010000000000000 // 4.0 |
functions
| 24 | func qf_eval(fid: i64, x: i64) -> i64 |
| 32 | func qf_i2f(k: i64) -> i64 |
| 40 | func nx_f64_quad_simpson(fid: i64, a: i64, b: i64, n: i64) -> i64 |