fx_gate.nx
buildroot/runtime/fx_gate.nx
about
fx_gate.nx -- the gate for the Q16.16 fixed-point math 49 modules import.
WHY: nx_gensota gen-3 worklist. This module exists for ONE reason -- bit-identical simulation
across machines (rollback netcode); IEEE-754 cannot deliver it. Its header numbers four
invariants FX1-FX4, and an invariant nothing checks is a wish.
★SCOPE DECLARED HONESTLY: determinism has an IN-PROCESS half (same input -> same bits, every
call) and a CROSS-MACHINE half (same bits on every target). T9 proves the first. The second
CANNOT be proven from one host and is NOT claimed here -- it would need the same vectors run
on a second architecture and compared. Saying so beats a gate that implies coverage it lacks.
⚠OPEN QUESTION FILED, NOT GUESSED (see debt): FX2 says fx_mul and fx_div "round toward zero
(arithmetic shift)" -- but an arithmetic right shift rounds toward NEGATIVE INFINITY on
negatives while integer division truncates toward ZERO, so the two may DISAGREE on negative
operands. Rather than pin a guessed direction, T5 asserts the property that is true either
way and matters to callers: the result is within ONE ULP of the exact product.
license_tier: ORIGINAL expect_exit: 0 No hw writes (Rule 26).
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxfx.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
| none |
functions
| 19 | func fxg_abs(v: i64) -> i64 { if v < 0 { return 0 - v } return v } called by 1: main |
| 21 | func main() -> i64 |