Docs/Numerics
Determinism Guarantees
Determinism is a graded property; the README is explicit about which kind applies where.
| Surface | Guarantee | What that means |
|---|---|---|
| Shape / stride / broadcast computation | Bit-deterministic, platform-independent. | Every broadcast_shape, fix_unknown_dimension, and contiguous_strides is a pure const fn-style computation. Same inputs always produce the same outputs, on every platform. |
| Dtype promotion | Bit-deterministic, exhaustively enumerated. | All 324 pairs explicit; no platform-dependent fallback path; no compiler-version-dependent inference. |
| RNG output (explicit seed) | Bit-exact vs NumPy upstream, platform-independent. | Generator::from_pcg64_dxsm(seed) and the eight ported distribution algorithms produce sequences identical to numpy.random.Generator(PCG64DXSM(seed)). |
| RNG output (no seed) | Fresh entropy, matching NumPy upstream. | SeedMaterial::None and no-seed default_rng() source OS entropy through getrandom; use an explicit seed for reproducible streams. |
| Ufunc / reduction values | Behaviorally equivalent vs NumPy to within the per-fixture relative tolerance recorded in each differential case. | Many ops coincide bit-for-bit with NumPy; when they don't, the differential gate compares against the explicit rel_tol field in the fixture. |
| Linalg outputs | Behaviorally equivalent vs NumPy up to tolerance; bit-deterministic on a single platform. | QR/SVD/Cholesky/eig values match NumPy within tolerance; on a given platform with a given Rust toolchain, repeating the call always yields the same bits. |
| FFT outputs | Behaviorally equivalent vs NumPy up to tolerance; deterministic ordering of butterfly operations. | The Cooley–Tukey and Bluestein paths are deterministic; output values match NumPy within the per-fixture relative tolerance configured for the FFT differential cases (fft_differential_cases.json). |
| IO round-trip | Byte-identical to numpy.save for the tested dtypes. |
fnp.save writes the same bytes as numpy.save, and savez the same members, for 24 dtype variants (bool, every int/uint width, float16/32/64, complex64/128, big-endian int/uint/float/complex, S, U, datetime64, timedelta64) in C and Fortran order at 0-d, 1-d, empty and 3-d (conformance_io::save_load_savez_are_byte_identical_to_numpy_across_dtypes_orders_and_shapes, 192 cells), plus NPY 1.0/2.0/3.0 headers and structured dtypes (conformance_io::npy_header_versions_structured_dtypes_and_compressed_npz_match_numpy). fnp.load returns numpy's dtype, shape, flags and bytes, or its exception type (conformance_io::load_from_a_path_matches_numpy_flags_values_and_errors, 145 cells). |
| Runtime decisions / evidence ledger | Deterministic for a given input class, mode, and evidence vector. | The DecisionLossModel is a fixed set of constants; the posterior estimator is a closed-form Bayesian update; the same inputs produce the same DecisionAction and the same DecisionEvent field values (modulo the ts_millis wall-clock timestamp, which is the only non-determinism in the struct). Byte-determinism on disk depends on the embedder's chosen serializer, since fnp-runtime does not ship one (see Reading the Evidence Ledger). |
| Conformance artifacts (fixtures, oracle outputs, RaptorQ sidecars) | SHA-256-stable across runs. | Every artifact bundle is content-hashed; the RaptorQ scrub gate verifies expected_hash matches decoded_hash (scrub report) and recovered_hash (decode proof). Grep artifacts/raptorq/*.scrub_report.json and *.decode_proof.json to inspect the hash fields directly. |
What is not deterministic: the order of evaluation inside an asupersync task graph (when that optional feature is enabled), the wall-clock timestamp embedded in evidence-ledger entries, and the host-environment fingerprint captured at benchmark time. These are observability metadata, not numerical state.