# Numerical fidelity and physical word bridge, 20 November 2026 This record describes the numerical and physical-address milestone. Scripted debugging was added afterwards; see [the debug guide](debug-media.md). ## Results * 446 language regressions and 26 SAP/BSS test methods, including machine boundary subtests. Original-output changes in builtin, powedge and Hilbert goldens were checked against the original compiler, not blessed from local output. The f704 signed-zero test deliberately retains AST operation order. * All 26 original-compiler dialect comparisons match exactly across 14 decks. The original 13 captures are unchanged. All seven old local-output fingerprints are removed. The new library grid supplies 150 function values over 25 inputs, with explicit MQ clearing before each original call. * The local independent inversion deck now matches all 25 scanned CHM values. Sim704 already reproduced these; native i704 still disagrees in 24/25. No claim is made that this separate emulator discrepancy has been resolved. * Four independently assembled SAP modules run with the original BSS loader on Sim704 and native i704 and through the local bridge. Nonblank printed lines agree exactly; native i704 inserts extra blank lines. A separate original-compiler SCALE object also runs locally. Provenance is in `tests/sap/reference/manifest.json`; no historical loader/library is vendored. The same 446 language checks, 26 bridge tests and 26 oracle comparisons also pass under AddressSanitizer and UndefinedBehaviorSanitizer (leak detection disabled for process-lifetime arenas). Kernel smoke checks, 22 editor tests and the FORTRAN collection's Sphinx build with warnings as errors pass. ## What changed FAD now follows the separate AC/MQ signs and the complement/increment steps of form 24-6661-2. Cancellation preserves signed zero. Decimal input uses the ROYCNV sequence of retained decimal digits, 704 FMP/FDP and biased powers. F/E output uses FIL/BDC's fixed-point digits, power-table low bits, original zero rendering and raw characteristics, including unnormalised BCD words. SQRT, LOG and ATAN use the original approximations with 704 operations. SIN/COS use fixed-point argument reduction and polynomial evaluation; COS passes the subtraction's MQ into sine. EXP loads the original guard constant into MQ before its fixed-point conversion. Coefficients are quantised using the observed SAP constant rules. These are independent C formulations of the algorithms; the IBM SAP listing remains in the external oracle cache. This does not remove host arithmetic from unrelated exponentiation or from constant construction, and does not establish portability to every C compiler. The build currently requires GCC/Clang-style 128-bit integer support. The physical 32K store gives arrays descending addresses and literals ascending, persistent words. COMMON/EQUIVALENCE/dummy aliases share those cells. Fixed integers use the decrement field; binary I/O preserves the complete raw word. The bounded loader/CPU and independent assembler are described in [sap-bss.md](sap-bss.md), including unsupported operations and calling conventions. ## Limits and contrary evidence The AST evaluates its own source expressions; it is not a reproduction of the original optimiser/register allocator. Original SIN can consume incoming MQ bits. An uncontrolled 25-input probe therefore differs from the deterministic MQ-zero local entry, whereas the explicitly cleared grid agrees. External evidence is retained outside the repository; the controlled grid has its own checked-in original captures. Compiler reordering can also change the sign of exact cancellation: original `tests/f704.f` computes D as negative zero, while the local written operation order yields positive zero. This is not an ALU rounding tolerance. No tolerance is used in the oracle comparison. Decimal conversion outside the historical table/conversion range retains the pre-existing checked fallback; extreme long significands and exponents are not exhaustively validated. The SAP assembler's longer DEC literals are also not a full reconstruction of historical SAP input conversion. The machine bridge is computational, not a complete IBM 704 emulator. Broader instruction, relocation, original library and compiler-context coverage stays on the roadmap. Scripted watches, checkpoints and text device views are now available in the [debug guide](debug-media.md). Graphical views remain planned. ## Review and reproduction The initial independent Fable 5.2 review found sign-bit opcodes accidentally written as decimal C literals. Corrected them to octal and added execution tests. Also fixed nested TSX targeting, ANA sign clearing, shift/rotate counts, MQ divide-check sign and AC retention, module bounds and trailing-BES relocation. Resolved stale raw integer I/O and made statement-function temporaries physical. The review's reset/idempotence suggestion is outside the one-process/one-load CLI lifecycle; the loader is not exposed as a reusable emulator service. Fable 5.2 completed the large initial review and a follow-up of the bridge, integration and wrap-up. The follow-up identified source/BSS name collisions and incorrect returns into the synthetic call sequence; these now fail explicitly. Added tests cover those cases, compound and nested-function arguments, and C28-6000-2 common-reassignment/control cards. Audited all EX_CALL walkers and raw/typed reads: no address is used as an AST unit index, numeric reads decode raw values, and arithmetic assignments clear raw state. Q/P result truncation follows the stored-word ABI; MQ-overflow checks are explicitly outside the subset. Descending Hollerith-array aliasing is deliberate physical behaviour, not a forward-text view. The completed independent implementation review for this milestone was by Fable 5.2. The earlier design review is separate from this implementation QA. ```sh make test make test-oracle make test-oracle-strict python3 -m fortran704kernel.test_kernel (cd editors/vscode && node --test tests/*.test.js) ``` For original captures use `tools/oracle.py capture` in a new directory; `original(..., modules=[...])` appends separately assembled cards before moving the main transfer card to the end. The normal no-module capture path is unchanged. The checked-in SAP witnesses contain source/object/output hashes.