Skip to content

v0.2.2 — prob_floor denormal-overflow fix + A=1 cleanup ledger

Latest

Choose a tag to compare

@JackDMenendez JackDMenendez released this 16 Jun 04:39

v0.2.2 -- prob_floor denormal-overflow fix + A=1 cleanup ledger

dcl_core v0.2.2 is a two-part patch to the prob_floor feature added
in v0.2.1:

  1. a bug fix -- prob_floor no longer NaN-poisons the state when a
    continuous wavepacket's exponential tail underflows to deep
    denormals; and
  2. an additive, read-only ledger -- CausalSession.floor_ledger()
    reports exactly how much probability the floor manufactures (the
    A=1 cleanup budget).

It exists to unblock dcl-delta-p-min's Phase 2 4-cell grid, whose
core column (exp_18_dp_min_grid, exp_09_dp_min_floor,
exp_12_dp_min_sweep) runs prob_floor on narrow tidal-ionization
packets over large lattices -- exactly the regime that surfaced the
denormal bug.

This is not v1.0.0. The formal API freeze remains gated on
dcl-delta-p-min finishing and co-releases with Paper III.

Semver: PATCH. The fix changes only previously-NaN results
(finite results reproduce to ~1 ulp); the ledger is purely additive and
read-only; prob_floor=None (default) is still bit-for-bit the
v0.2.0/v0.2.1 engine; no re-exported symbol is added or removed.

Fixed -- prob_floor denormal overflow -> NaN

The rescale factor was computed as sqrt(prob_floor / p(x)). A
continuous wavepacket's exponential tail underflows p(x) to deep
denormals (p ~ 1e-323), where the intermediate prob_floor / p
overflows to inf and NaN-poisons the joint renormalisation, destroying
the state on tick 0. v0.2.2 computes the algebraically identical
sqrt(prob_floor) / sqrt(p), keeping both operands in the normal
float64 range (even the smallest subnormal p ~ 1e-323 has
sqrt(p) ~ 3e-162).

Added -- floor_ledger() (A=1 cleanup budget)

Raising a sub-floor node from p up to prob_floor manufactures
(prob_floor - p) of probability; end-of-tick renormalisation
redistributes it so A=1 still holds, but the manufactured mass is a real
bookkeeping quantity. CausalSession.floor_ledger() and the floor_*
counters record it exactly. All counters stay 0 when
prob_floor is None. Quantitatively the ledger makes the cross-engine
non-equivalence visible: a small floor (1e-10-1e-6) manufactures
negligible mass; an aggressive floor (0.25) manufactures mass >> 1
and over-writes the packet toward uniform -- unlike core3d, where
sub-quantum mass rounds down to empty rather than up to the
floor.

Tests

pytest tests/ -> 257 passed, 1 skipped, 26 xfailed (v0.2.1: 252
passed). The new tests are in tests/test_prob_floor_a1_consistency.py:
TestProbFloorDenormalOverflow (a genuine deep-denormal tail stays
finite and A=1-unit over 20 ticks under np.errstate(over='raise', invalid='raise') across prob_floor in {1e-10, 1e-6, 1e-3, 0.25}, plus
split-sqrt vs fused-form agreement) and TestProbFloorLedger (zero
ledger when None; exact floor - p for a known sub-floor node;
>> 1 manufactured under an aggressive floor while A=1 holds). The 26
xfails remain pre-existing Paper~I port drift.

Installing

pip install "git+https://github.com/JackDMenendez/dcl-core@v0.2.2"

What is NOT in v0.2.2

Unchanged from v0.2.1's deferral list: GPU kernels, inter-session
coupling, complex TokenResidual carry. Out of scope for the ledger
itself: a prob_ceiling, per-edge/per-plaquette floors, and a
prob_floor on core3d (its quantum is N alone).


Citation. See CITATION.cff. DOI:
10.5281/zenodo.20711380.