Aryabhata's Algorithm for the Square Root of an Integer

​
number of digits
8
calculate integer square root
random integer: 12 34 56 78
step 1
(20 × 0 + 3) × 3
12
-9
3
________
step 2
(20 × 3 + 5) × 5
3 34
-325
9
________
step 3
(20 × 35 + 1) × 1
9 56
-701
255
________
step 4
(20 × 351 + 3) × 3
255 78
-21069
4509
________
integer square root: 3513
remainder: 4509
This Demonstration shows the different steps in the "longhand" or manual calculation of integer square roots. The integer square root of a number
n
is the greatest integer less than or equal to
n
.
The algorithm used was discovered in 520 AD by the Indian mathematician Aryabhata. It is still used today for longhand calculations of integer square roots.
The main part of the algorithm is the function findLargest, which calculates the successive digits
b
i
of the integer square root. For the
th
i
group of two digits
n
i
, the number
b
i
is the largest integer for which
b
i
(20
a
i
+
b
i
)<
n
i
.

External Links

Square Root Algorithms (Wolfram MathWorld)

Permanent Citation

Erik Mahieu
​
​"Aryabhata's Algorithm for the Square Root of an Integer"​
​http://demonstrations.wolfram.com/AryabhatasAlgorithmForTheSquareRootOfAnInteger/​
​Wolfram Demonstrations Project​
​Published: December 10, 2010