Shunyaya Symbolic Mathematical Hardware – Order-Invariant Streaming & Division Policy (1.4–1.5)

1.4 — Streaming that equals batch (order-invariant)

  • U/W rule. Maintain running totals and publish once: U += w*atanh(a) ; W += w ; a_out := tanh( U / max(W, eps_w) ).
  • Guarantee. batch == stream == shuffled for the alignment lane (within fixed epsilon).
  • Defaults. eps_w = 1e-12 guards empty/degenerate windows; common weight is w := |m|^gamma with default gamma = 1 (uniform option: w = 1).
  • Order-invariance snippet (ASCII, line-by-line).
    from math import atanh, tanh
    EPS_A, EPS_W = 1e-6, 1e-12
    def uw_update(U, W, a, w=1.0):
    a = max(-1+EPS_A, min(+1-EPS_A, a))
    return U + w*atanh(a), W + w
    def uw_finish(U, W):
    return tanh( U / max(W, EPS_W) )

1.5 — Division policy (magnitude lane only)

  • Strict. Classical divide with explicit zero handling outside the kernel.
  • Meadow. Totalized divide (e.g., 1/0 -> 0) as a declared sentinel.
  • Soft. Guarded denominator max(|g|, denom_soft_min) for dashboards.
  • Rule. The alignment lane always uses the bounded divide from 1.3 (a_div = (a_f - a_g) / (1 - a_f*a_g)); only m follows the chosen policy.
  • Disclosure. The active division_policy must be declared alongside numeric knobs for reproducibility.

Navigation
Back: Shunyaya Symbolic Mathematical Hardware – Two-Lane Fundamentals (1.1–1.3)
Next: Shunyaya Symbolic Mathematical Hardware – Ports & Silicon Mapping (1.6–1.7)


Directory of Pages
SSMH – Table of Contents