Abstract
In this paper, we discuss the division in the computation of binary Bailey–Borwein–Plouffe (BBP)-type formulas for mathematical constants. To compute a specific digit of a mathematical constant using a BBP-type formula, we need only calculate the fractional part of the sum of quotients. It is sufficient to perform division and summation for BBP-type formulas in fixed-point arithmetic for only the fractional part. In our previous work, calculation of the fractional part of a 128-bit quotient of a 64-bit dividend divided by a 64-bit divisor was performed in fixed-point arithmetic based on the exact division. We extend this to the case where calculation of the fractional part of an m-word quotient of a one-word dividend divided by a one-word divisor is performed in fixed-point arithmetic. When performing an exact division in binary, the denominator of the fraction must be an odd number. We show that even if the denominator of the fraction is an even number, exact division can be performed using the method of applying Montgomery multiplication to modular exponentiation in binary BBP-type formulas. We also show that rounding the quotient in the computation of binary BBP-type formulas reduces the accumulation of the round-off errors better than truncating the quotient.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Adamchik, V., Wagon, S.: \(\pi \): a 2000-year-old search changes direction. Math. Edu. Res. 5, 11–19 (1996)
Adamchik, V., Wagon, S.: A simple formula for \(\pi \). Am. Math. Mon. 104, 852–855 (1997)
Adegoke, K., Lafont, J.O., Layeni, O.: A class of digit extraction BBP-type formulas in general binary bases. Notes Number Theory Discret. Math. 17, 18–32 (2011)
Bailey, D., Borwein, P., Plouffe, S.: On the rapid computation of various polylogarithmic constants. Math. Comput. 66, 903–913 (1997)
Bailey, D.H.: The BBP algorithm for pi (2006). https://www.davidhbailey.com/dhbpapers/bbp-alg.pdf
Bailey, D.H.: A compendium of BBP-type formulas for mathematical constants (2023). https://www.davidhbailey.com/dhbpapers/bbp-formulas.pdf
Bailey, D.H., Crandall, R.E.: On the random character of fundamental constant expansions. Exp. Math. 10, 175–190 (2001)
Bellard, F.: A new formula to compute the n’th binary digit of pi (1997). https://bellard.org/pi/pi_bin.pdf
Borwein, J., Bailey, D.: Mathematics by experiment: plausible reasoning in the 21st century, 2nd edn. A K Peters, Natick (2008)
Craig-Wood, N.: Euler found the first binary digit extraction formula for \(\pi \) in 1779. Euleriana 3, Article 3 (2023)
Fog, A.: Instruction tables: lists of instruction latencies, throughputs and micro-operation breakdowns for Intel, AMD, and VIA CPUs (2022). https://www.agner.org/optimize/instruction_tables.pdf
Jebelean, T.: An algorithm for exact division. J. Symb. Comput. 15, 169–180 (1993)
Karrels, E.: Computing the quadrillionth digit of \(\pi \) (2013). https://on-demand.gputechconf.com/gtc/2013/presentations/S3071-Computing-the-Quadrillionth-Digit-of-Pi.pdf
Montgomery, P.L.: Modular multiplication without trial division. Math. Comput. 44, 519–521 (1985)
Sze, T.W.: The two quadrillionth bit of pi is 0! distributed computation of pi with Apache Hadoop. In: Proc. 2010 IEEE Second International Conference on Cloud Computing Technology and Science (CloudCom 2010), pp. 727–732 (2010)
Takahashi, D.: Computation of the 100 quadrillionth hexadecimal digit of \(\pi \) on a cluster of Intel Xeon Phi processors. Parallel Comput. 75, 1–10 (2018)
Takahashi, D.: On the computation and verification of \(\pi \) using BBP-type formulas. Ramanujan J. 51, 177–186 (2020)
Takahashi, D.: On the use of Montgomery multiplication in the computation of binary BBP-type formulas for mathematical constants. Ramanujan J. 59, 211–219 (2022)
Acknowledgments
This work was supported by JSPS KAKENHI Grant Number JP22K12045.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2025 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Takahashi, D. (2025). On the Division in the Computation of Binary BBP-Type Formulas for Mathematical Constants. In: Sergeyev, Y.D., Kvasov, D.E., Astorino, A. (eds) Numerical Computations: Theory and Algorithms. NUMTA 2023. Lecture Notes in Computer Science, vol 14477. Springer, Cham. https://doi.org/10.1007/978-3-031-81244-6_32
Download citation
DOI: https://doi.org/10.1007/978-3-031-81244-6_32
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-81243-9
Online ISBN: 978-3-031-81244-6
eBook Packages: Computer ScienceComputer Science (R0)