nx_arith_research.nx source
↩ module page · 30 lines · 2165 B
1// nx_arith_research.nx -- THIN structured ARITHMETIC research source organ. COMPOSES nx_research_engine (the shared
2// fetch->extract->bank); declares the OPERATOR-CHOSEN arithmetic sources grouped under descriptive SECTIONS with
3// purpose -- structured nishi knowledge, NOT a flat TSV, NO copy-pasted fetch loop. Supersedes both
4// nx_arith_research_fetch (the copy-pasted organ) and knowledge/research/sources/arith.tsv (the flat list).
5// expect_exit: 0 license_tier: ORIGINAL
6import "nx_research_engine.nx"
7const K_MAGIC_8388608: i64 = 8388608
8
9func main() -> i64 {
10 let store: *TrustStore = rf_init()
11 if (store as i64) == 0 { rf_puts("arith: trust store load failed\n" as *u8); return 1 }
12 rf_puts("CA roots="); rf_putn(trust_store_count(store)); rf_puts(" -- ARITHMETIC research -> Library\n" as *u8)
13 let cap: i64 = K_MAGIC_8388608
14 let out: *u8 = sys_mmap(cap)
15 var ok: i64 = 0
16
17 rf_section("QUANTIZATION ground-up (bits, outliers / super-weights, accuracy vs bit-width)" as *u8)
18 ok = ok + rf_fetch_bank("https://simonwillison.net/2026/Mar/26/quantization-from-the-ground-up/" as *u8, "arith_quant_ground_up" as *u8, store, out, cap)
19
20 rf_section("LOW-PRECISION FLOAT (FP8 E4M3/E5M2, MXFP8 block-scaling E8M0, BF16)" as *u8)
21 ok = ok + rf_fetch_bank("https://developer.nvidia.com/blog/floating-point-8-an-introduction-to-efficient-lower-precision-ai-training/" as *u8, "arith_fp8_training" as *u8, store, out, cap)
22 ok = ok + rf_fetch_bank("https://www.edge-ai-vision.com/2026/04/modern-trends-in-floating-point/" as *u8, "arith_fp_trends" as *u8, store, out, cap)
23
24 rf_section("STANDARD + SCALE (IEEE P3109 ML-arithmetic format; AI training-compute trend)" as *u8)
25 ok = ok + rf_fetch_bank("https://standards.ieee.org/ieee/3109/11165/" as *u8, "arith_ieee3109" as *u8, store, out, cap)
26 ok = ok + rf_fetch_bank("https://ourworldindata.org/grapher/artificial-intelligence-training-computation" as *u8, "arith_ai_train_compute" as *u8, store, out, cap)
27
28 rf_puts("ARITH BANKED: "); rf_putn(ok); rf_puts(" / 5 (sections preserved, gzip-guarded; run nx_library_harvest_v2 to index)\n" as *u8)
29 return 0
30}