nx_classical_unpatented.nx
buildroot/runtime/nx_classical_unpatented.nx
about
nx_classical_unpatented.nx -- 10 classical unpatented public-domain
algorithms in pure nishi-lang.
Per user directive 2026-05-14: "i want all non patented open
algorithms avoid licenses etc make sure it is nishi lang".
Each algorithm is:
- Older than any plausible patent / well-established public domain
- Implemented in nishi-lang (no host-language helpers)
- Cardinal-aligned: tier-aliases throughout, no magic numbers
Bundled together because they share a test harness (one elf, one
qemu invocation) -- cuts per-primitive build overhead for the
curated batch.
Each function below carries its own provenance comment block
(who/when/where) for the algorithm-cards-comprehensive cardinal.
dependencies 3 imports · 9 importers
imports: nx_syscalls.nxnx_tier.nxnx_bits.nx
imported by: _gcd_replace_gate.nxnx_classical_unpatented_test.nxnx_math_games.nxnx_notebook_demo.nxnx_proofs_comprehensive.nxnx_triangulation_battery.nxnx_triangulation_classical.nxnx_triangulation_number_theory.nxnx_triangulation_sort_string_graph.nx
structs
| none |
consts
| none |
functions
| 34 | func nx_gcd_euclidean(a: nx_int, b: nx_int) -> nx_int |
| 49 | func nx_lcm(a: nx_int, b: nx_int) -> nx_int |
| 61 | func nx_fibonacci(n: nx_int) -> nx_int |
| 81 | func nx_bubble_sort(arr: *nx_int, n: nx_idx) -> nx_int |
| 108 | func nx_insertion_sort(arr: *nx_int, n: nx_idx) -> nx_int |
| 136 | func nx_binary_search(arr: *nx_int, n: nx_idx, target: nx_int) -> nx_idx |
| 152 | func nx_linear_search_idx(arr: *nx_int, n: nx_idx, target: nx_int) -> nx_idx |
| 174 | func nx_popcount_swar(x: nx_int) -> nx_int |
| 183 | func nx_log2_floor_int(x: nx_int) -> nx_int |
| 199 | func nx_isqrt_newton(x: nx_int) -> nx_int |