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

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
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
preprint

Accelerating the Computation of Hexadecimal Digits of Pi Using Bellard's Formula by Grouping Fractions

Mark Kim
Zenodo (CERN European Organization for Nuclear Research)
Advanced Mathematical Identities
preprint

Accelerating the Computation of Hexadecimal Digits of Pi Using Bellard's Formula by Grouping Fractions

Mark Kim
preprint en

Abstract

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.

Zenodo (CERN European Organization for Nuclear Research)
Advanced Mathematical Identities
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.