Published July 5, 2026 | Version Version 3.1

A modular DSP architecture for extreme-precision computation of π: Theory, implementation, and the 100M barrier run

  • 1. Independent Reseach

Description

TL;DR: Calculating $\pi$ at extreme precision typically hits a Memory Wall where parallel threads choke on shared memory access. This repository implements the Hybrid Stride-6 Architecture, which breaks this bottleneck by decomposing the Chudnovsky series into 6 completely independent calculation channels using modular arithmetic ($\mathbb{Z}/6\mathbb{Z}$). This translates an inherently memory-bound problem into a CPU-bound one, enabling near-linear scaling on commodity hardware with zero inter-thread communication.

Executive Summary

This repository hosts the reference implementation and experimental validation of the Hybrid Stride-6 Architecture for the extreme-precision computation of $\pi$. The software exploits a formal mathematical isomorphism between the modular decomposition of integer-indexed series in number theory and the polyphase decomposition of discrete-time signals in digital signal processing (DSP).

Instead of parallelizing a monolithic Binary Splitting tree via shared memory, this architecture divides the Chudnovsky series from the start into six independent sub-series. Because these channels operate on disjoint index sets, they execute under a strict Shared-Nothing discipline—requiring no locks, no synchronization, and no shared memory bandwidth during the intensive computation phase.

The architecture's capability is demonstrated via The 100M Barrier Run, computing $10^8$ decimal digits of $\pi$ in under 20 minutes on a resource-constrained cloud instance (2 vCPUs, 12 GB RAM) with a parallelization efficiency of 95% and less than 7 GB of peak RAM usage.

Key Technical Contributions

1. Algorithmic Innovations

  • Shared-Nothing Parallel Model: Six decoupled Python processes operating in absolute memory isolation, maximizing L1/L2 cache locality and bypassing the Global Interpreter Lock (GIL).

  • Stride-6 Transition Leaf: A compressed recursion leaf that aggregates blocks of 6 consecutive terms in a single operation, compressing the Binary Splitting tree depth by a factor of $\log_2 6 \approx 2.585$.

  • Exact Phase Correction: Direct local accumulation of the linear term $B(k)$ inside the Stride-6 leaf node, preventing the "off-by-one-stride" phase errors typical of naive block skipping.

2. Experimental Validation Metrics

  • Empirical Orthogonality: The $\ell^2$ norm of the individual modular channels was summed and matched against the monolithic series norm, yielding zero information leakage or numerical drift (exact to machine precision).

  • Verification: The resulting $10^8$ character stream achieves a bit-exact match against standard reference constants generated by y-cruncher.

Performance Matrix: The 100M Barrier Run

The following benchmark represents execution metrics on a commodity, non-HPC cloud instance (2 vCPUs, 12 GB RAM):

Metric Result Analytical Significance
Digits Calculated 100,000,000 Confirms exascale-capable precision constraints.
Total Computation Time 1,194.32 s (~19.90 min) High-sustained throughput under hardware limitations.
Parallel Efficiency 95.0% ($1.90\times$ speedup) Near-linear scaling across available physical cores.
Peak RAM Footprint ~6.8 GB Bypasses monolithic memory allocation limits.
Sustained Throughput 83,729 digits/second Highly competitive with compiled, non-portable frameworks.
Numerical Integrity 100% Bit-Exact Match Zero cumulative drift or phase errors across channels.

Architectural Comparison

Aspect Monolithic Binary Splitting Hybrid Stride-6 (This Work) y-cruncher (State-of-the-Art)
Memory Pattern Contiguous, saturates bus Local per core, optimizes cache Sequential disk I/O swapping
Parallel Model Fine-grained synchronization Embarrassingly parallel Multi-threaded with custom locks
Scalability Limit Memory Bus Bandwidth CPU compute bounds (to 6 cores) Physical Disk Write I/O
RAM Requirement Entire dataset in active memory Working memory set reduced 6$\times$ Uses storage disk as virtual RAM
Core Philosophy Maximize raw loop speed Maximize hardware efficiency Maximize absolute raw speed

Implementation Details

The Stride-6 Leaf Node Engine

Unlike conventional Binary Splitting algorithms that process hypergeometric matrix operations term-by-term, this architecture implements an aggregated evaluation phase for a block of six terms:

 

Python
 
def compute_stride6_leaf(j, r):
    """
    Calculates the compressed 6-step transition within a block.
    Enables workers to advance via stride hops of 6.
    """
    k_start = 6 * j + r
    P_total, Q_total = 1, 1

    for i in range(6):
        k = k_start + i
        P_step = - (12*k**2 + 8*k + 1) * (6*k + 5)
        Q_step = C3_24 * (k + 1)**3
        P_total *= P_step
        Q_total *= Q_step

    # Accumulate the linear term from the block start for correct phase alignment
    B_val = A + B * k_start
    return P_total, Q_total, B_val

 

Design Insight: Synthesizing $T_{\text{leaf}} = Q \cdot B_{\text{val}}$ from the block baseline eliminates cumulative phase drift, ensuring mathematical convergence matches the original monolithic Chudnovsky algorithm down to the last decimal place.

Reproducibility and Quick Start

1. Instant Cloud Verification

The experimental validation code can be compiled instantly without local environment configuration:

 

2. Verification Protocol

The validation companion script walks through the following steps:

  1. Identity Verification: Verifies the underlying trigonometric properties and checks for zero cross-channel energy leakage.

  2. Algorithmic Accuracy: Validates the Stride-6 computational kernel via a 100,000-digit precision check.

  3. Stress Run: Triggers the large-scale memory-isolated computational stack to measure hardware scalability.

Academic Citation

If this architecture or the underlying polyphase isomorphism influences your computational research, please cite both reference works:

 

Fragmento de código
 
@article{peinador2026modularDSP,
  title={Modular DSP Architecture for EPC of $\pi$]{A modular DSP architecture for extreme-precision computation of $\pi$: Theory, implementation, and the 100M barrier run},
  author={Peinador Sala, Jos{\'e} Ignacio},
  publisher={Zenodo},
  year={2026},
  doi={10.5281/zenodo.17768718},
  url={https://github.com/NachoPeinador/Arquitectura-de-Hibridacion-Algoritmica-en-Z-6Z}
}

@article{peinador2026polyphase,
  title={Polyphase Isomorphism]{Polyphase isomorphism between modular arithmetic and multirate digital signal processing: With formal verification in Lean 4 and computational validation},
  author={Peinador Sala, Jos{\'e} Ignacio},
  publisher={Zenodo},
  year={2026},
  doi={10.5281/zenodo.17680023}
}

 

Licensing & Terms of Use

1. Academic & Research Applications (Complimentary)

This software is provided under the PolyForm Noncommercial License 1.0.0.

  • Permitted: Educational instruction, non-commercial scientific research, personal hobbyist forks, and open peer-review validations.

  • Requirements: Preserving copyright notices, clear author attribution, and strict adherence to non-profit operational bounds.

2. Commercial Applications (Proprietary License Required)

Commercial use of this software, its derivative algorithms, or the Stride-6 leaf framework requires a separate, explicit licensing contract. This applies to:

  • Integration into commercial mathematical software utilities or multi-precision libraries.

  • Utilization in closed-source high-performance computing (HPC) benchmarking services.

  • Deployment inside commercial cloud computing infrastructures or paid SaaS architectures.

For inquiries regarding commercial acquisition or enterprise deployment: Contact: joseignacio.peinador@gmail.com Subject Line: "Commercial License Inquiry — Modular $\pi$ Architecture"

Author: José Ignacio Peinador Sala

Contact: joseignacio.peinador@gmail.com

ORCID: 0009-0008-1822-3452

Repository & Source: GitHub Link

Companion Theoretical Work: Peinador Sala, J. I., A Modular DSP Architecture for Extreme-Precision Computation of π: Theory, Implementation, and the 100M Barrier Run

📝 Manuscript Status: This work has been submitted to SeMA Journal (Springer) for publication consideration.
* Theoretical Foundation Paper ID: SEMJ-S-26-00195
* Parallel Architecture Companion Paper ID: SEMJ-S-26-00196

Files

AMS_A Modular DSP Architecture for Extreme-Precision Computation of π.pdf

Additional details

Related works

Is supplement to
Preprint: 10.5281/zenodo.17680023 (DOI)

Dates

Submitted
2025-11-30
Updated
2026-02-02
Engish version
Updated
2026-06-21
This release presents the article as a self-contained, computationally focused work, extracted and substantially restructured from the earlier manuscript "The Modular Spectrum of π: Theoretical Unification, DSP Isomorphism, and Exascale Validation". Relative to that prior work, the following improvements have been made: - The article now focuses exclusively on the Hybrid Stride-6 architecture for extreme-precision computation of π. - The Polyphase Isomorphism is summarised as the theoretical foundation (Section 2), with full formal proofs deferred to the companion article M2. - The Stride-6 transition leaf and its critical phase correction are described in full algorithmic detail. - The 100M Barrier Run benchmark is presented with complete performance metrics (95% parallel efficiency, 83,729 digits/s, <7 GB peak RAM). - A philosophical and technical comparison with monolithic Binary Splitting and y-cruncher is included. - All Riemann zeta analyses, supercongruences, and physical speculations have been removed. - A companion Colab notebook provides fully reproducible validation of the architecture, including the modular decomposition, the Stride-6 benchmark, and the 100M Barrier Run. - The bibliography, keywords, and backmatter have been updated to reflect the new scope.
Updated
2026-07-05
Version 3.1 — Release Notes What's new in this version: Compliance with Official AMS Formatting: The \LaTeX\ source code of the manuscript has been thoroughly refactored to align strictly with the official American Mathematical Society template (utilizing the specific mcom-l document class for the Mathematics of Computation journal). Top Matter Restructuring: The initial metadata block of the article has been reorganized according to the publisher's style handbook. This includes relocating the abstract environment before the \maketitle command, as well as providing the unabbreviated institutional affiliation and author contact information. MSC2020 Classification Update: Subject classification codes have been corrected and updated to the latest international standard (MSC2020), replacing deprecated categories with exact codes for parallel numerical computation (65Y05) and automated/interactive theorem proving (68V15). Layout and Formatting Optimization: Text block dimensions have been adjusted, redundant centering environments removed, and complex table headers restructured into multiple rows to ensure the document fits perfectly within the journal's native margins and prevents overfull hboxes. Synchronization with Editorial Submission: The codebase in this repository and the validation notebook have been fully synchronized with the exact version of the manuscript officially submitted to the AMS, which is currently Under Review.

Software

References

  • D. V. Chudnovsky and G. V. Chudnovsky, Approximations and complex multiplication according to Ramanujan, in Ramanujan Revisited: Proceedings of the Centenary Conference, Academic Press, 375–472 (1988).
  • W. A. Wulf and S. A. McKee, Hitting the memory wall: Implications of the obvious, ACM SIGARCH Comput. Archit. News 23(1), 20–24 (1995). doi:10.1145/216585.216588
  • M. Stonebraker, The case for shared nothing, IEEE Database Eng. Bull. 9(1), 4–9 (1986).
  • Peinador Sala, J. I., Polyphase isomorphism between modular arithmetic and multirate digital signal processing: With formal verification in Lean 4 and computational validation, preprint (2026). 10.5281/zenodo.17680023
  • A. Yee, y-cruncher — A Multi-Threaded Pi Program, (2023). y-cruncher
  • Peinador Sala, J. I., A Modular DSP Architecture for Extreme-Precision Computation of π: Theory, Implementation, and the 100M Barrier Run, preprint (2026). 10.5281/zenodo.17768718