code wiki / (root) / nx_matrix_eig_gate.nx

nx_matrix_eig_gate.nx

buildroot/runtime/nx_matrix_eig_gate.nx

13214 B220 linesdepth 4pulls 6 transitivereach 0 importersview sourcekind gate/prooftopic matrix
docsdependenciesstructsconstsfunctions

about

nx_matrix_eig_gate.nx -- AM1: DOES THE SYMMETRIC EIGENSOLVER ACTUALLY SOLVE, AND CAN IT REFUSE? The done-rule was pre-declared on /compare/appliedmath before a line of the solver was written: "reconstructing the matrix from its factors returns the original within the declared bound, the eigenvalues of a known symmetric matrix match their exact values, and a singular matrix is reported singular rather than inverted" so these teeth are the rule being met rather than a rule written to fit what the code happens to do. EVERY TOOTH IS AN INVARIANT OF THE EIGENPROBLEM, NOT A STORED ANSWER. Trace equals the sum of the eigenvalues; a diagonal matrix has its own diagonal as its spectrum; eigenvectors of a symmetric matrix are orthonormal; and the residual max|AV - VL| is the bound the reference libraries publish. A stored golden vector would record that the author agreed with the code on one afternoon; these hold for any correct implementation and fail for any wrong one. license_tier: ORIGINAL expect_exit: 0

dependencies 3 imports · 0 importers

syscalls.nx nx_matrix.nx nx_gate_verdict.nx nx_matrix_eig_gate.nx

imports: syscalls.nxnx_matrix.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

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

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_head gv_puts sys_write ↻ nx_matrix_alloc nx_matrix_set nx_matrix_eig_sym nx_matrix_is_symmetric nxm_abs nx_matrix_get nx_matrix_alloc ↻ nx_matrix_set ↻ nx_matrix_get ↻ nx_matrix_identity nx_matrix_fill nx_matrix_set ↻ nxm_abs ↻ nxm_fsqrt nx_isqrt nxm_fmul nxm_fdiv gv_check_eq gv_check gv_puts ↻

structs

none

consts

20const EG_Q: i64 = 16384
24const EG_TOL: i64 = 64
27const EG_RESID_MAX: i64 = 96

functions

29func eg_abs(v: i64) -> i64 { if v < 0 { return 0 - v } return v }
called by 1: main
31func main() -> i64