Accelerating the Computation of Hexadecimal Digits of Pi Using Bellard's Formula by Grouping Fractions
This paper addresses the acceleration of computing arbitrary hexadecimal digits of pi using Bellard's formula. We propose a computational modification in which seven fractions with linear denominators are combined into a single rational function with a common denominator. This replacement reduces the number of modular exponentiations from seven to one for each term of the series. The mathematical basis of the transformation, the digit extraction algorithm, and integer arithmetic constraints are described. Local benchmarks in Python 3.12.6 demonstrate a runtime advantage of 1.93x to 2.72x over the standard implementation. Furthermore, the applicability of this fraction grouping method is investigated and successfully verified against Smith's formula.
Authors
- Mark Kim (ORCID: https://orcid.org/0000-0001-7601-831X)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-10-13
- DOI
- https://doi.org/10.5281/zenodo.23348802
- Primary Topic
- Advanced Mathematical Identities
- Type
- preprint