code wiki / _hdl_build / _gcd_replace_gate.nx

_gcd_replace_gate.nx

buildroot/runtime/_hdl_build/_gcd_replace_gate.nx

2545 B65 linesdepth 5pulls 5 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

_gcd_replace_gate.nx -- DIFFERENTIAL-REPLACEMENT test at the DERIVE bar (eve R4): is the SEARCH-derived gcd (nx_evo_gcd's champion, body [1 3 0 2]) behaviorally IDENTICAL to the Claude-authored nx_gcd_euclidean? The operator's exact test: "turn off Claude's gcd, emit ours, see if they function the same." If GREEN across every (0..80)x(0..80) pair, the team's derived STRUCTURE is a verified drop-in for a REAL, USED production organ -- the first real used Bar-C self-authoring. PROVENANCE: gcd_evolved's body is VERBATIM from the search-emitted runtime/_hdl_build/_evo_gcd_champ.nx (the structure the SEARCH composed, not hand- designed -- I expected [swap,mod], the search found this). license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_classical_unpatented.nx _gcd_replace_gate.nx

imports: nx_syscalls.nxnx_classical_unpatented.nx

imported by: nobody (leaf or entry point)

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

main gcd_evolved nx_gcd_euclidean grg_w sys_write grg_n sys_write ↻ sys_mmap sys_exit

structs

none

consts

none

functions

14func gcd_evolved(a: i64, b: i64) -> i64
called by 1: main
33func grg_w(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 1: main calls 1: sys_write
34func grg_n(v: i64) -> i64
called by 1: main calls 2: sys_writesys_mmap
42func main() -> i64