Skip to content

paper: make Section VIII reproducible and recompute the constants independently - #114

Merged
nmoinvaz merged 21 commits into
mainfrom
paper/referee-campaign
Nov 19, 2026
Merged

nmoinvaz merged 21 commits into
mainfrom
paper/referee-campaign

Conversation

@nmoinvaz

Copy link
Copy Markdown
Owner

Stacked on #112. Makes Section VIII true from the repository: findings 12, 13, 15, 17, 41 and 46.

The campaign (finding 12)

paper/campaign.py reruns the tests of Theorems 9, 15 and 19, Corollary 18 and Proposition 24 on fpemu.py, and takes multidouble's bits through accumulator/acc_check, which gains the modes addn8, addf8, mulf8, mul8 and div8. Its outputs are stored in paper/campaign/, and Section VIII quotes only what they print.

Mode What it prints
bits p = 53, n = 8: 10,000 inputs of each of ADD, ADDF, MULF, MUL and DIV, 0 mismatches with multidouble, every error within its bound (at most 0.0073 of it), every product and one-signed sum on H(2); dense random operands err by at most 0.0064 u^8 |Z|; a broken emulator mismatches on 182 to 300 of 300
small p = 3: every four-term tuple of 61 values at n = 3 (7,036,411) and every triple of 81 values, none beyond min_k B_k, 40,600 attaining it, Fast2Sum throughout losing more on 948,874; p = 5, n = 3 and p = 7, n = 4: 1,166,592 and 352,000 operand pairs within Theorems 15 and 19
sharp Proposition 24's inputs for n = 2 to 8: the stated errors exactly, half the bound failing

The independent recomputation (finding 13)

paper/review/ now holds programs I wrote from the appendix's text at 187ce44 before opening sloppy_consts.py, trig_consts.py, explog_consts.py or the earlier review/indep_*.py. They share gop.py (Lemmas 11 and 13, Theorems 14, 19, 21 and 27 from the text) and no code with the paper's scripts.

Result Recomputed The paper's script
Table IV, kappa (log2), MUL, ADD, ADDF at theta = 2 37.922093, 19.988743, 10.564149 37.93, 19.99, 10.57
Theorem 19, kappa_DIV (log2), theta = 1, 2 25.936780, 27.473746 26.0, 27.48
Theorem 21, delta_4 / u^8, theta = 1, 2 3.000019707, 3.000031815 3.000019708, 3.000031816
Theorem 30, R_s + Delta_8 u (log2), theta = 1, 2 30.411602, 31.924189 30.4117, 31.9242
Theorem 30, E_lev at K = 64 (log2) 2.683219 2.6833
Theorem 35, C and C^T at n = 8 3.163167393, 6.418350521 3.163168, 6.418351
Theorem 35, double word 7.841411278, 28.414065409 7.841412, 28.414066
Theorem 35 at n = 2, 4, 12 3.168700337, 6.452137636; 3.164154339, 6.426154346; 3582.787310690, 4929.367334851 3.168701, 6.452138; 3.164155, 6.426155; 3582.787311, 4929.367335
Theorem 40, eps_exp / u^8 3.660060455 3.660061
Theorem 42, eps_ln / u^8 and log2 Phi 9.925819, -509.0880 9.925819, -509.08
Lemma 43, eps_w / u and eta_b / u 4.311719, 5.914423 4.311719, 5.914423

Every value agrees. The recomputation of Theorem 35 evaluates all 212 buckets where the script takes one per pair of series lengths, and it is what showed that the paper quoted C below its computed value (3.163167 for 3.1631674), which #111 corrects. Theorem 42's takes the double-word start's constants from the statement of Proposition 44. Each program has a control that must print FAIL. The earlier indep_exp.py and indep_log.py, written from an earlier text, are removed.

What is cut, and why

No committed script prints these, so they are gone from the text (findings 15 and 17):

  • the first reviewer's recomputation "with separate code" and the third reviewer's emulator of the accumulator, whose code is not in the repository;
  • "precisions 5 to 10 with 5 to 8 parts", "about 37 million renormalizations" and "reached with ratio 1": the campaign's own counts replace them;
  • the maxima of cargo test on random arguments: 0.01 u^8 for the operations (now the campaign's 0.0064 u^8 on dense random operands), 0.48 u^8, 1.82 u^2 and 4.07 u^2 for the trigonometric functions, 0.25 u^8, 0.0070 u^8, 1.04 u^2, 1.27 u^2 and 3.491 u for exp, ln and the binary64 logarithm;
  • "terms of relative size 2^-325" for the Fast2Sum pass, "645 inputs" for the division, and the accumulator's "about 0.6 u|s_m|" per deposit and the joint construction.

sloppy_consts.txt is now stored, and acc_check.py prints the construction's ratios at K = 64 that Remark 29 quotes.

Text (findings 41 and 46)

Section VIII says what each script checks, without the history of the review. "How this work was done" is three sentences and names the recomputation of Appendices F to H and K to M.

No theorem's statement or constant changes here.

@nmoinvaz nmoinvaz added documentation Improvements or additions to documentation unit tests Tests labels Nov 19, 2026
@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

Next included review available in 15 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 64 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 295978c4-4162-4017-99af-bfdc79d2cc78
Commits

Reviewing files that changed from the base of the PR and between c03a9c1 and f85b7d0.

Files ignored due to path filters: 1

  • paper/expansion-error-bounds.pdf is excluded by !**/*.pdf
Files selected for processing: 36

  • paper/README.md
  • paper/accumulator/acc_bound.py
  • paper/accumulator/acc_check.py
  • paper/accumulator/acc_check/src/main.rs
  • paper/accumulator/out/acc_check.txt
  • paper/campaign.py
  • paper/campaign/bits.txt
  • paper/campaign/sharp.txt
  • paper/campaign/small.txt
  • paper/constants.py
  • paper/expansion-error-bounds-accumulator.tex
  • paper/expansion-error-bounds-appendix.tex
  • paper/expansion-error-bounds-explog.tex
  • paper/expansion-error-bounds-sloppy.tex
  • paper/expansion-error-bounds-trig.tex
  • paper/expansion-error-bounds.tex
  • paper/explog_bits.py
  • paper/explog_consts.py
  • paper/fpemu.py
  • paper/review/explog_common.py
  • paper/review/gop.py
  • paper/review/indep_exp.py
  • paper/review/indep_log.py
  • paper/review/lem43_lnb.py
  • paper/review/out/gop.txt
  • paper/review/out/lem43_lnb.txt
  • paper/review/out/thm30_sloppy.txt
  • paper/review/out/thm35_trig.txt
  • paper/review/out/thm40_exp.txt
  • paper/review/out/thm42_log.txt
  • paper/review/thm30_sloppy.py
  • paper/review/thm35_trig.py
  • paper/review/thm40_exp.py
  • paper/review/thm42_log.py
  • paper/sloppy_consts.py
  • paper/sloppy_consts.txt
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@greptile-apps

greptile-apps Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 4/5

[Low impact] The changes affect reproducibility materials and paper text, not the library’s runtime behavior.

Correct the input precision and refresh the affected results before merging.

Findings

  1. P1 Operands use the wrong precision ▶

Summary

Adds repeatable arithmetic tests and a separate recomputation of the paper’s constants, then updates Section VIII to cite their saved results.

  • The paper’s main numerical checks now run from one reproducible campaign.
  • Independent programs recompute the paper’s numerical constants from its formulas.
  • Accumulator checks now print how their largest errors compare with the bound.

The small-precision campaign builds its operands at the previous test’s precision, so its stated coverage and saved results need correction.

Reviews (1) · Last reviewed commit: "paper: rebuild the PDF" · Reviewed by Greptile

Comment thread paper/campaign.py Resolved
@codecov

codecov Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.95%. Comparing base (c03a9c1) to head (f85b7d0).
⚠️ Report is 21 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #114   +/-   ##
=======================================
  Coverage   95.95%   95.95%           
=======================================
  Files          22       22           
  Lines       14013    14013           
=======================================
  Hits        13446    13446           
  Misses        567      567           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@nmoinvaz
nmoinvaz added this pull request to stack #116 November 19, 2026 06:42
Base automatically changed from paper/referee-claims to main November 19, 2026 06:53
New code in paper/review, written from the appendix at 187ce44 before reading the paper's constants scripts, recomputes the constants of the sloppy multiply, the trigonometric functions, exp, ln and the binary64 logarithm.
campaign.py reruns the tests of Theorems 9, 15 and 19, Corollary 18 and Proposition 24 on the emulator: bit for bit against the crate at p = 53, exhaustive families at small precision, and Proposition 24's inputs, each with controls. acc_check gains the modes it needs, and the outputs are stored in paper/campaign.
The review programs now compare with the values the paper quotes rounded up and print their own rounded up, and their outputs are stored in review/out. indep_exp.py and indep_log.py, written from an earlier text of the appendix, are removed.
sloppy_consts.py had no stored output, and no script printed the construction's ratio to its leading term and to the bound at K = 64 that the accumulator's remark quotes.
The maxima of the crate's tests on random arguments, the size of the terms a Fast2Sum pass drops and the accumulator's growth per deposit had no script or stored output in the repository. The remark on the construction now quotes what acc_check.py prints.
The section described a campaign and reviews whose code is not in the repository, and narrated the paper's revisions. It now quotes the outputs of campaign.py and of the recomputations in review/, the random-operand error comes from the campaign, and How this work was done is three sentences that name the recomputation.
The PDF of the rewritten Section VIII.
small() built its families while the emulator was still at the precision of the test before, so the operands were rounded to 3 and 5 bits and many coincided. The precision is now set first, the family is checked for duplicates, and small.txt is regenerated: every pair is still within its bound, the largest at 0.43 of it.
Lambda, beta, alpha, gamma, zeta, pi and f each stood for several things, and R and Delta were absolute in Lemmas 11 and 13 and normalized in Theorem 14. The appendices rename all but one use of each, write the number pi upright, and the scripts' docstrings name the paper's symbols.
Each of these theorems stated a recursion for computing a bound. The recursion now stands in a paragraph before the theorem, which states the bound and its computed value. The numbering is unchanged.
Algorithm 2 took c_0 to c_N with N at most n, and Appendix B and Theorem 9 take N terms c_0 to c_(N-1) with N at most n + 1.
The text had its last parts near 2^(-2j-320). The last of eight parts of 1 - r^2/2 is about u^6 r^2 / 2, near 2^(-2j-319).
The unit, the crate's OD::EPS, was used in a caption and a remark and never defined.
The trigonometric functions run DWTimesDW3 and exp and ln DWTimesDW2. The text now says how they differ and that each appendix's constants are those of its product.
Table I named the operand x for the sine, cosine and tangent and a elsewhere, and Table II listed the operations in another order than Table I.
Shewchuk for expansions, Moller and Knuth for TwoSum, Sterbenz for the exact subtractions and Payne and Hanek for the reduction of large arguments were used without a reference. The list is now in order of first citation, with page ranges for the three ACM articles, the Universal pull request's full title, the crate's version and commit, and the QD authors' release.
The number 3.5 is that of the HAL preprint, as the crate's comment says. The published article could not be opened to confirm its numbering.
Assume with a bare reference printed as Assume 6, and IEEEtran's paragraph headings printed labels a) to d) that nothing refers to. The appendices now write Under Assumption 6 and use an unlabeled run-in heading.
Figure 1's labels were about 5 pt after scaling, the appendix started mid-column, Table V floated two pages past its text, and two long inline chains were stretched across the column. The figure is redrawn larger, the appendix starts on a new page, the table moves before its section, and the chains are displays.
Lemma 33 wrote f_k for the real that the expansion F_k approximates, another use of f. It is now F_k with the superscript e that the lemma's other exact values carry.
The PDF of the notation, references and layout changes.
@nmoinvaz
nmoinvaz force-pushed the paper/referee-campaign branch from c0065ee to f85b7d0 Compare November 19, 2026 06:58
@nmoinvaz
nmoinvaz merged commit e9663db into main Nov 19, 2026
36 checks passed
@nmoinvaz
nmoinvaz deleted the paper/referee-campaign branch November 19, 2026 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation unit tests Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant