Skip to content

Implement exact FFT word multiplication on fixed tapes - #3787

Merged
Mister-Meeseeks merged 2 commits into
CrocSwap:mainfrom
jmbarrancoml:research/physical-fft-word
Oct 20, 2026
Merged

Mister-Meeseeks merged 2 commits into
CrocSwap:mainfrom
jmbarrancoml:research/physical-fft-word

Conversation

@jmbarrancoml

@jmbarrancoml jmbarrancoml commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

I implement exact unsigned n-bit multiplication in the retained fixed-tape model, with O(n log2(n+2)^2) time and O(n) space. I apply the classical radix-digit reduction through corrected PR3709, head 62264289adb01f3ba4930cd0154c75887f96203c, while retaining its internal Karatsuba multiplier. The dependency is acyclic.

I choose b=ceil(log2 n), q=ceil(n/b), minimal r=2^ell>=2q, and p0=2b+ell. The normalized return Q_p0(fg/r) has exact ordinary convolution coefficients as real numerators because 2^p0=r*2^(2b) and the degree is below r. Sequential carries recover the exact 2n-bit result. I preserve borrowed values and heads, consume protected child outputs and restore fixed scratch. The full bill includes unamortized twiddle setup for A=C=1.

This supplies a concrete scalar primitive for the Gaussian arithmetic handoff after PR3763. With delta=.0001, I derive arithmetic power .9981 below the inherited full Fourier power .99827619697. I leave Gaussian coefficient production, guarded convolutions, factor-page access, window restoration and the complete CRT/integer join open.

I started from canonical main 20ecf2891d80b5acf18d980b2164fb44ea7faa90, priority revision 6, and recorded the expansion decision before implementation in Discussion3664. Before submission I refreshed main and searched 491 open PRs and 2,509 Discussion records. The PR changes only research/physical-fft-word/.

I register seven suites: actual default FFT products at 17 and 19 bits, integration with the retained signed Arithmetic caller, base reuse, separate codec fixtures through 1,024 bits, large encoded geometry, 13 failure controls, source authentication and exact cost arithmetic. PROOF.md gives the all-size argument; EVIDENCE.md distinguishes full execution from codec and metadata checks. Reproduce with python3.12 scripts/research_package.py --package research/physical-fft-word.

Validation at 9b5474f47b0ea9a3c76bb5b1b577fb36704815e0:

  • I passed all seven registered suites locally, plus metadata, committed-byte and source-history checks.
  • I replayed the official committed export outside Git on Darwin arm64, Python 3.12.13, and checked that all 22 regular files, including the receipt, stayed unchanged. The full FFT sequence took 152.451 seconds and returned the same exact products.
  • Export SHA256: d428e8b6aef4d348fa2e922ca64c4cfd634bbb2f0c150033273e65fcf4600b49; receipt SHA256: 237ccd34aadda692f73b85277816b76168acaecfe06a12996cce37a7f0925cbc.
  • I verified all seven hosted suites and the unchanged-input check in CI39166027769, which completed with success at this head. I matched its tested merge tree to the publication tree 97bbd90bca3ae03b8b6d9e6044b1fd5f3a2d2be0.

I retain PR3709's numerical precision/recovery premises and Arham Tahir's separate audit as pending author work. I credit the standard FFT/radix and Karatsuba algorithms, Mason Hale's certified interval reference, Dugongue's scalar-ABI precedent, the retained rad20 Gaussian reports and the nested source notices. I leave the selected frontier unchanged. Jose Manuel (jmbarrancoml), with substantial OpenAI Codex assistance in mathematics, implementation, source analysis and checks; I claim no independent human or formal-kernel review.

@jmbarrancoml
jmbarrancoml marked this pull request as ready for review October 18, 2026 21:09
@Mister-Meeseeks
Mister-Meeseeks merged commit 14ee747 into CrocSwap:main Oct 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants