Abstract
In this paper, we propose an algorithm for multiple integer divisions with an invariant dividend and monotonically increasing or decreasing divisors. In such multiple integer divisions, we show that if the dividend and divisors satisfy a certain condition, then if only one quotient is calculated by division first, the remaining quotients can be obtained by correcting the previously calculated quotients at most once. The proposed algorithm is up to approximately 1.90 and 1.85 times faster than the 64-bit unsigned integer division instruction of the Intel 64 architecture and Intel Short Vector Math Library (SVML) on the Intel Xeon Platinum 8368 processor, respectively.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Alverson, R.: Integer division using reciprocals. In: Proceedings of 10th IEEE Symposium on Computer Arithmetic (ARITH 1991), pp. 186–190 (1991)
Brent, R.P., Zimmermann, P.: Modern Computer Arithmetic. Cambridge University Press, Cambridge (2010)
Drane, T., Cheung, W.C., Constantinides, G.: Correctly rounded constant integer division via multiply-add. In: Proceedings of 2012 IEEE International Symposium on Circuits and Systems (ISCAS 2012), pp. 1243–1246 (2012)
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
Granlund, T., Montgomery, P.L.: Division by invariant integers using multiplication. In: Proceedings of ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 1994), pp. 61–72 (1994)
Intel Corporation: Intel C++ compiler classic developer guide and reference (2021). https://www.intel.com/content/dam/develop/external/us/en/documents/cpp_compiler_classic.pdf
Intel Corporation: Intel 64 and IA-32 architectures software developer’s manual, volume 1: Basic architecture (2022). https://cdrdv2-public.intel.com/671436/253665-sdm-vol-1.pdf
Jacobsohn, D.H.: A combinatoric division algorithm for fixed-integer divisors. IEEE Trans. Comput. C-22, 608–610 (1973)
Lemire, D., Bartlett, C., Kaser, O.: Integer division by constants: optimal bounds. Heliyon 7, e07442 (2021)
Möller, N., Granlund, T.: Improved division by invariant integers. IEEE Trans. Comput. 60, 165–175 (2011)
Monniaux, D., Pain, A.: Formally verified 32- and 64-bit integer division using double-precision floating-point arithmetic. In: Proceedings of 29th IEEE Symposium on Computer Arithmetic (ARITH 2022), pp. 128–132 (2022)
Montgomery, P.L.: Modular multiplication without trial division. Math. Comput. 44, 519–521 (1985)
Robison, A.D.: N-bit unsigned division via n-bit multiply-add. In: Proceedings of 17th IEEE Symposium on Computer Arithmetic (ARITH 2005), pp. 131–139 (2005)
Rodeheffer, T.L.: Software integer division (2008). https://www.microsoft.com/en-us/research/wp-content/uploads/2008/08/tr-2008-141.pdf
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)
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
© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Takahashi, D. (2023). Multiple Integer Divisions with an Invariant Dividend and Monotonically Increasing or Decreasing Divisors. In: Gervasi, O., et al. Computational Science and Its Applications – ICCSA 2023. ICCSA 2023. Lecture Notes in Computer Science, vol 13957. Springer, Cham. https://doi.org/10.1007/978-3-031-36808-0_26
Download citation
DOI: https://doi.org/10.1007/978-3-031-36808-0_26
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-36807-3
Online ISBN: 978-3-031-36808-0
eBook Packages: Computer ScienceComputer Science (R0)