You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DONE: exact deterministic roundoff law for a dirty scalar commutator
#5257
DONE — exact rounding law for a two-factor dirty scalar commutator. This is a scoped precision result with an executed exact checker. No new kappa, native supplier or production-kernel claim.
This addresses the deterministic-correlation question in Adam Gall's PR #2067, pinned question. The result applies to the explicitly defined scalar model below. It does not assume independent rounding errors, and it does not identify this model with the full PR1054 numerical leaf.
Let R(t)=floor(t+1/2), with exact integer registers x,y,z and rational a,b. Execute the literal four shears:
z += R(a*x); y += R(b*z); z -= R(a*x); y -= R(b*z).
The inverse operations subtract the same rounded quantity; they do not round a negated coefficient again. The source and dirty connector restore exactly. Put r=R(ax), write b=u/v in lowest terms with v>0, and use Euclidean division ur=kv+q, 0<=q<v. As z ranges over one complete residue period modulo v, the target increment is exactly k on v-q residues and k+1 on q residues. If q=0 there is only one value.
Proof: the increment is R(bz+br)-R(bz). Write br=k+q/v. Its extra carry is one exactly when the fractional part of bz+1/2 is at least 1-q/v. Since gcd(u,v)=1, those v fractional parts are an equally spaced grid, translated by 1/2. Exactly q points cross that threshold. This includes negative u and r and the prescribed tie convention.
Consequently the complete-period mean error relative to bax is b(r-ax), and the variance about that mean is q(v-q)/v^2. The maximum absolute error is computed from the two displayed values with positive counts. Uniformity here describes an exact finite census, not a random-input assumption.
A deterministic sharpness consequence: for every odd v>=3 take a=1/2, b=(v-1)/v and x=2v-3. Then r=v-1, k=v-2 and q=1. One actual dirty residue produces error
3(v-1)/(2v) -> 3/2.
Both factors are contractions; all scalar subset products have norm at most one. Every leaf rounds with error at most 1/2. Thus the inherited coefficient T(2)=3 is a sharp supremum even for deterministic correlated rounding, when denominator and initial dirt are unrestricted. Exact dirty restoration alone cannot reduce that coefficient. This does not settle the all-height correlation question or a fixed magnitude/denominator class.
The following standard-library checker ran with CPython 3.12.13 in normal and optimized modes. It replays the actual four updates, checks the complete residue census, mean, variance and restoration, then checks 25 members of the sharpness family and a tie-sensitive inverse control. Copy to FILE.py and run python3.12 -I -B FILE.py and python3.12 -I -O -B FILE.py.
Credit: Adam Gall (@adamgall) supplied the sharp independent-defect endpoint recurrence and the correlation question in PR #2067. Chafik Boukhalfa (@chafreaky) supplied the dirty commutator in PR #628; its numerical/kernel lineage remains credited there. Classical floor and residue identities are used here.
Next useful question: can a bound on actual leaf denominators and permitted dirty magnitudes rule out this family, or does a larger balanced word attain its independent-defect count? First bind one real numerical leaf and its rounding convention; the scalar model does not supply that binding. Physical cost, cyclic inverse kernels, all-height precision, selected cold replay and proof-kernel/human review were not checked.
Base ff3cc58; priority revision 7. Live PR search, the predecessor Discussion and current tracked notes were checked. The previous multi-question thread asks follow-ups to use their specific result; this is the canonical thread for the scalar rounding question. No matching active scalar-distribution investigation was found in that bounded coverage. Prepared by Ali Romman with substantial OpenAI Codex assistance. Apache-2.0. The scope is complete and unreserved.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
DONE — exact rounding law for a two-factor dirty scalar commutator. This is a scoped precision result with an executed exact checker. No new kappa, native supplier or production-kernel claim.
This addresses the deterministic-correlation question in Adam Gall's PR #2067, pinned question. The result applies to the explicitly defined scalar model below. It does not assume independent rounding errors, and it does not identify this model with the full PR1054 numerical leaf.
Let R(t)=floor(t+1/2), with exact integer registers x,y,z and rational a,b. Execute the literal four shears:
The inverse operations subtract the same rounded quantity; they do not round a negated coefficient again. The source and dirty connector restore exactly. Put r=R(ax), write b=u/v in lowest terms with v>0, and use Euclidean division ur=kv+q, 0<=q<v. As z ranges over one complete residue period modulo v, the target increment is exactly k on v-q residues and k+1 on q residues. If q=0 there is only one value.
Proof: the increment is R(bz+br)-R(bz). Write br=k+q/v. Its extra carry is one exactly when the fractional part of bz+1/2 is at least 1-q/v. Since gcd(u,v)=1, those v fractional parts are an equally spaced grid, translated by 1/2. Exactly q points cross that threshold. This includes negative u and r and the prescribed tie convention.
Consequently the complete-period mean error relative to bax is
b(r-ax), and the variance about that mean isq(v-q)/v^2. The maximum absolute error is computed from the two displayed values with positive counts. Uniformity here describes an exact finite census, not a random-input assumption.A deterministic sharpness consequence: for every odd v>=3 take a=1/2, b=(v-1)/v and x=2v-3. Then r=v-1, k=v-2 and q=1. One actual dirty residue produces error
Both factors are contractions; all scalar subset products have norm at most one. Every leaf rounds with error at most 1/2. Thus the inherited coefficient T(2)=3 is a sharp supremum even for deterministic correlated rounding, when denominator and initial dirt are unrestricted. Exact dirty restoration alone cannot reduce that coefficient. This does not settle the all-height correlation question or a fixed magnitude/denominator class.
The following standard-library checker ran with CPython 3.12.13 in normal and optimized modes. It replays the actual four updates, checks the complete residue census, mean, variance and restoration, then checks 25 members of the sharpness family and a tie-sensitive inverse control. Copy to FILE.py and run
python3.12 -I -B FILE.pyandpython3.12 -I -O -B FILE.py.Credit: Adam Gall (@adamgall) supplied the sharp independent-defect endpoint recurrence and the correlation question in PR #2067. Chafik Boukhalfa (@chafreaky) supplied the dirty commutator in PR #628; its numerical/kernel lineage remains credited there. Classical floor and residue identities are used here.
Next useful question: can a bound on actual leaf denominators and permitted dirty magnitudes rule out this family, or does a larger balanced word attain its independent-defect count? First bind one real numerical leaf and its rounding convention; the scalar model does not supply that binding. Physical cost, cyclic inverse kernels, all-height precision, selected cold replay and proof-kernel/human review were not checked.
Base ff3cc58; priority revision 7. Live PR search, the predecessor Discussion and current tracked notes were checked. The previous multi-question thread asks follow-ups to use their specific result; this is the canonical thread for the scalar rounding question. No matching active scalar-distribution investigation was found in that bounded coverage. Prepared by Ali Romman with substantial OpenAI Codex assistance. Apache-2.0. The scope is complete and unreserved.
All reactions