HOCRMay 31

On the History of the Square and Multiply Algorithm

arXiv:2606.009587.2
Predicted impact top 73% in HO · last 90 daysOriginality Synthesis-oriented
AI Analysis

For historians of mathematics and computer science, this paper clarifies the algorithm's lineage but is primarily a historical survey with no new technical contributions.

This paper traces the historical origins of the square-and-multiply algorithm, identifying Jamshid al-Kashi's 15th-century work as the first explicit articulation of the general method, with earlier instances in al-Uqlidisi, al-Biruni, and Pingala (c. 200 BCE).

The square-and-multiply algorithm, also known as binary exponentiation or repeated squaring, is a technique for fast exponentiation commonly used in modern cryptography and computational number theory. Despite its prominence, the historical origins of the algorithm are not known with certainty. This paper critically examines the origins and formalization of the algorithm through primary source analysis. We focus on Jamshid al-Kashi's fifteenth-century Miftah al-Hisab where the algorithm is articulated explicitly as a general method and claimed by al-Kashi as his own innovation. To contextualize this, we trace earlier instances of successive squaring in the works of al-Uqlidisi and al-Biruni, who applied these techniques for specific calculations, but did not formalize them into a general procedure. The earliest known work on this method of computation is found in Pingala's prosodic studies in ancient India (c. 200 BCE). Even though it was not fully developed as a general technique, Pingala's work seems to contain the conceptual foundation of the algorithm which is to employ the binary representation of a positive integer. By mapping this intellectual progression, the paper illustrates the historical background of an algorithm that is prominent in modern computation.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes