{
  "schema_version": "1.3.0",
  "slug": "when-does-float-accumulation-over-a-ledger-diverge-from-decimal-arithmetic",
  "title": "When does float accumulation over a ledger diverge from decimal arithmetic?",
  "date_of_record": "2026 November 1",
  "scope": "Applies to monetary or unit-sensitive accumulation where values are stored or summed as binary floating point and compared against a decimal or integer reference. Excludes analytics where relative error is tolerated and no reconciliation occurs.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-does-float-accumulation-over-a-ledger-diverge-from-decimal-arithmetic.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-does-float-accumulation-over-a-ledger-diverge-from-decimal-arithmetic.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-does-float-accumulation-over-a-ledger-diverge-from-decimal-arithmetic.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 835,
    "python_slice_tokens": 110,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "**Predicate.** Binary floating point represents sums exactly if and only if every addend and every partial sum is a dyadic rational within the mantissa width. Monetary values in base 10 are generally not dyadic, so error accumulates as O(n * eps * magnitude). Safe if and only if values are held as integer minor units or decimal, and conversion to float happe...",
    "what_was_observed": "**Signature.** Reconciliation mismatch between two ledgers that both compute correctly. The difference is small, non-constant, and changes when the processing order changes. Re-running the same batch on a different shard assignment changes the delta. **Trace.** Ten million additions of values near 0.1 in float64 produce a total that differs from the decimal sum by roughly 1e-6 relative. At cent resolution on a billio...",
    "condition_of_validity": "Accumulation is exact only while at least one holds: 1. **Representation.** Values are stored as integer minor units, and all arithmetic is integer or decimal. 2. **Bound.** The number of additions and the magnitude are provably within the range where float error is below the required resolution. 3. **Order.** Addition order is fixed and the rounding error i...",
    "decision_boundary": "- Integer or decimal representation: exact. - Float with a proven error bound below resolution: acceptable, must be re-proven when volume or magnitude changes. - Float with no bound, reconciled against a decimal reference: the reference catches it, but only if reconciliation is mandatory and alerted. - Float with no bound and no reference: unsound, and undet...",
    "operational_effect": "The defect is invisible until a second computation exists, so it survives every test that checks consistency with itself. Remediation is a representation change at the storage boundary, not a rounding fix at the display boundary. The trap is to round at output. That hides the drift without removing it, and it makes the drift non-associative, so the ledger no..."
  },
  "matched_failure_symptoms": [
    "FLOAT_PRECISION_OR_ROUNDING_DRIFT"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "15e42ba3bea90697e87f7ce6881cd83df9b9cad55e1ed35664cda107b8fbaa54",
    "verified_classes": [
      "LedgerPrecisionError",
      "LedgerGate"
    ],
    "verified_functions": [
      "dispatch_accumulator",
      "verify"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "LedgerPrecisionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "decimal"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
