
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: Identity Verification: Verifies the underlying trigonometric properties and checks for zero cross-channel energy leakage. Algorithmic Accuracy: Validates the Stride-6 computational kernel via a 100,000-digit precision check. 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
Parallel computing, Arithmetics, Mathematical method, Exascale validation, Prime numbers, Computational science, Polyphase decomposition, Shared-nothing architecture, 68W10, Arbitrary-precision arithmetic, Chudnovsky algorithm, DSP isomorphism, Mathematical model, 11Y60, Number theory, Riemann zeros, Spectral rigidity, Mathematical logic, Z/6Z, Memory wall, Mathematics, Stride-6 architecture, Quantum chaos
Parallel computing, Arithmetics, Mathematical method, Exascale validation, Prime numbers, Computational science, Polyphase decomposition, Shared-nothing architecture, 68W10, Arbitrary-precision arithmetic, Chudnovsky algorithm, DSP isomorphism, Mathematical model, 11Y60, Number theory, Riemann zeros, Spectral rigidity, Mathematical logic, Z/6Z, Memory wall, Mathematics, Stride-6 architecture, Quantum chaos
| selected citations These citations are derived from selected sources. This is an alternative to the "Influence" indicator, which also reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically). | 0 | |
| popularity This indicator reflects the "current" impact/attention (the "hype") of an article in the research community at large, based on the underlying citation network. | Average | |
| influence This indicator reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically). | Average | |
| impulse This indicator reflects the initial momentum of an article directly after its publication, based on the underlying citation network. | Average |
