nx_bench_spectral.nx
buildroot/runtime/nx_bench_spectral.nx
about
nx_bench_spectral.nx -- NishiLang twin of bench/xlang/spectral.c (spectral-norm,
Computer Language Benchmarks Game). FIRST FLOAT (f64) racing-bench workload,
proving the 2026-07-16 f64 codegen on a real 3rd-party task. N=100, published
answer 1.274219991 -> line 1 = eigenvalue*1e9 truncated (1274219991), line 2 =
us. f64 values ride as i64 bit-patterns in i64 arrays; scalars are `f64`.
Structurally identical scalar operations to the C twin (Newton sqrt, same
reduction order) so nx/gcc/clang agree bit-for-bit at 9-digit truncation.
license_tier: ORIGINAL No hw writes (Rule 26).
(nx_syscalls_x86_64.nx import REMOVED 2026-07-31, debt 1785528831: this file already
gets the canonical syscall layer via nx_clock.nx -> syscalls.nx, so importing the raw-x86
module too put TWO syscall layers in one TU -- every wrapper twice, numbering picked by
definition ORDER, silently.)
dependencies 1 imports · 0 importers
imports: nx_clock.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 15 | const SN_N: i64 = 100 |
functions
| 17 | func sp_emit_i64(fd: i64, n: i64) -> i64 called by 1: main |
| 36 | func sp_eval_A(i: i64, j: i64) -> f64 |
| 42 | func sp_A_times_u(u: *i64, Au: *i64) -> i64 |
| 59 | func sp_At_times_u(u: *i64, Au: *i64) -> i64 |
| 76 | func sp_AtA_times_u(u: *i64, AtAu: *i64, tmp: *i64) -> i64 |
| 83 | func sp_sqrt(x: f64) -> f64 called by 1: main |
| 90 | func main() -> i64 |