code wiki / (root) / nx_u256_mul4_fuzz.nx

nx_u256_mul4_fuzz.nx

buildroot/runtime/nx_u256_mul4_fuzz.nx

2223 B63 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind tooltopic u256
docsdependenciesstructsconstsfunctions

about

nx_u256_mul4_fuzz.nx -- differential fuzz: the G2 4x64 multiply (u256_mul_wide_4x64, using __umulhi64) MUST be byte-exact vs the proven 8x32 schoolbook oracle (u256_mul_wide) for every input. Catches any software-carry bug in the 128-bit accumulation. exit 0 = all matched; nonzero encodes where. Must be compiled by a G2-capable compiler (knows __umulhi64). license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_u256.nx nx_u256_mul.nx nx_u256_mul4_fuzz.nx

imports: nx_syscalls.nxnx_u256.nxnx_u256_mul.nx

imported by: nobody (leaf or entry point)

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

main nx_scratch_save nx_scratch_init sys_mmap u256_alloc nx_scratch nx_scratch_init ↻ nx_scratch_oom sys_write sys_exit sys_mmap ↻ u256_wide_alloc nx_scratch ↻ u256_mul_wide u256_mul_wide_4x64 u256_mul_wide ↻ nx_scratch_restore

structs

none

consts

10const K_MAGIC_4000: i64 = 4000
11const K_MAGIC_6364136223846793005: i64 = 6364136223846793005
12const K_MAGIC_1442695040888963407: i64 = 1442695040888963407
13const K_MAGIC_1000000: i64 = 1000000

functions

15func main() -> i64