# Traditional Abacus and Bead Arithmetic/Roots

## Introduction[edit | edit source]

Obtaining square and cubic roots are the most complex operations studied within Elemental Arithmetic. The eastern abacus is very well adapted to obtaining square roots by a direct and efficient procedure, but unfortunately the same cannot be said with reference to cube roots which, although possible, require a tortuous path full of comings and goings that it is prone to errors.

Cargill Gilston Knott (1856 - 1922), one of the fathers of modern seismology, was a Scottish physicist and mathematician who served nine years as a professor of mathematics, acoustics and electromagnetism at the Imperial University of Tokyo; after which he was awarded the Order of the Rising Sun by Emperor Meiji in 1891. During his stay in Japan he came into contact with the Japanese abacus which he studied in depth and without a doubt he used professionally in his own work as a teacher and researcher. The result of this study was a famous 55 pages article^{[1]} written in 1885 about it, which for a long time has been the best informed account in English, and obligatory reference, on the history and foundations of soroban. The next two chapters in this book develop and expand on Knott's vision of the traditional methods of obtaining square and cube roots, the vision of a western scientist and mathematician, offering both a theoretical and practical approach illustrated with several examples.

## Chapters[edit | edit source]

This part of the book consists of the following chapters:

## Checking your exercises[edit | edit source]

Obtaining square and cubic roots with the abacus can be a somewhat long process and during the learning phase it is interesting to have a tool that allows us to control whether we are doing it correctly.

### Square root[edit | edit source]

For square roots you can try the excellent Murakami's **Square root tutor with Kijoho**, a JavaScript application that you can run directly in your browser or download to your computer from its GitHub repository. You just have to enter the root in the small input box on the left and repeatedly press the "next" button on the screen to see the development of the process step by step.

### Cube root[edit | edit source]

#### File knott.bc[edit | edit source]

And mainly for cube roots, the following BC code may help, copy and paste it to a text file and call it knott.bc:

```
/*
Functions to help to learn/verify square and cube roots a la Knott
with the abacus, soroban, suanpan.
See: https://jccabacus.blogspot.com/2021/06/roots-la-knott.html
as a reference.
Jesús Cabrera, June 2021
CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
Use at your oun risk!
*/
define int(x)
{
# Integer part of x
auto os,r
os=scale; scale=0
r=x/1
scale= os
return (r)
}
define cbrt(x)
{
# Cube root of x
return (e(l(x)/3))
}
define knott2(r0, y0, alpha)
{
/*
Square root following Cargill G. Knott steps
See example of use in file sr200703.bc
use: $ sr200703.bc |bc -l knott.bc
*/
auto so, div
so = scale; /* Store old scale value */
scale = 1
a = 10*y0
div = 100*r0 + alpha/2
print "New dividend: ",div/1,"\n"
b = int(div/(a))
tf = div -b*a -b^2/2
if (tf<0){
b=b-1;print "Revising down, b = ",b, "\n"
tf = div -b*a -b^2/2
}
print "New root: ", a+b,", New half-remainder: ", tf/1
print "\n==================\n\n"
scale = so; /* restore old scale value */
return
}
define knott3(r0, y0, alpha)
{
/*
Cube root following Cargill G. Knott steps
See example of use in file cr488931400152.bc
use: $ cat cr488931400152.bc |bc -l knott.bc
*/
auto so, div, ta, tb, tc, td, te
so = scale; /* Store old scale value */
scale = 0
a = 10*y0
div = 1000*r0 + alpha
print "New dividend: ",div,"\n\n"
ta = div/y0; rem1 = div % y0
print "a) /a: ", ta, " rem1: ", rem1, "\n"
tb = (10*ta)/3; rem2 = (10*ta) % 3
print "b) /3: ", tb, " rem2: ", rem2, "\n"
b = tb/(100*a)
print " b = ",b,"\n"
tc = tb - b*(a+b)*100
print "d) : ",tc,"\n"
b = tb/(100*(a+b))
print " b = ",b,"\n"
tc = tb - b*(a+b)*100
print "d) : ",tc,"\n"
if(b==10){
/* Trick to avoid some problems */
b = 9
print "b: ",b,"\n"
tc = tb - b*(a+b)*100
print "d) tc: ",tc,"\n"
}
td = tc*3 +rem2
print "e) *3: ",td,"\n"
te = (td/10)*y0 +rem1
print "f) *a: ",te,"\n"
tf = te - b^3
print "g) -b^3: ",tf,"\n"
print "\nNew root: ",(a+b)," New remainder: ",tf,"\n\n"
print "==================\n\n"
scale = so; /* restore old scale value */
return
}
```

#### File: sr200703.bc[edit | edit source]

/* Example: square root of 200703 Use: $ cat sr200703.bc |bc -l knott.bc or $ bc -l knott.bc < sr200703.bc */ print "\nSquare root of ", 200703, " = ", sqrt(200703), "\n\n" /* Decompose in pairs of digits (will be alpha): 20, 07, 03 Initialize (first step) */ alpha = 20 b = int(sqrt(alpha)) r0 = alpha - b^2 a = 0 tf = r0/2 print "First root: ", b, ", First half-remainder: ", tf, "\n" print "==================\n\n" /* Main: Repeat for each pair of digits (alpha)... */ alpha =07 mute=knott2(tf, a+b, alpha) alpha =03 mute=knott2(tf, a+b, alpha) /* For additional digits continue with alpha = 00 */ alpha =00 mute=knott2(tf, a+b, alpha) alpha =00 mute=knott2(tf, a+b, alpha) alpha =00 mute=knott2(tf, a+b, alpha) alpha =00 mute=knott2(tf, a+b, alpha)

Output:

Square root of 200703 = 447.99888392718122931160 First root: 4, First half-remainder: 2.00000000000000000000 ================== New dividend: 203.5 Revising down, b = 4 New root: 44, New half-remainder: 35.5 ================== New dividend: 3551.5 Revising down, b = 7 New root: 447, New half-remainder: 447.0 ================== New dividend: 44700.0 Revising down, b = 9 New root: 4479, New half-remainder: 4429.5 ================== New dividend: 442950.0 New root: 44799, New half-remainder: 39799.5 ================== New dividend: 3979950.0 New root: 447998, New half-remainder: 395998.0 ================== New dividend: 39599800.0 New root: 4479988, New half-remainder: 3759928.0 ==================

#### File cr488931400152.bc[edit | edit source]

/* Example: cube root of 488931400152 Use: $ cat cr488931400152.bc |bc -l knott.bc or $ bc -l knott.bc < cr488931400152.bc */ print "\nCube root of ", 488931400152, " = ", cbrt(488931400152), "\n\n" /* Decompose in triplets (will be alpha): # 488, 931, 400, 152 Initialize (first step) */ alpha = 488 b = int(cbrt(alpha)) r0 = alpha - b^3 a = 0 tf = r0 print "First root: ", b, ", First remainder: ", r0, "\n" print "==================\n\n" /* Main: Repeat for each triplet (alpha)... */ alpha = 931 mute = knott3(tf, a+b, alpha) alpha = 400 mute = knott3(tf, a+b, alpha) alpha = 152 mute = knott3(tf, a+b, alpha) /* For additional digits continue with alpha = 000 */

Output

Cube root of 488931400152 = 7877.99999999999999999871 First root: 7, First remainder: 145 ================== New dividend: 145931 a) /a: 20847 rem1: 2 b) /3: 69490 rem2: 0 b = 9 d) : -1610 b = 8 d) : 7090 e) *3: 21270 f) *a: 14891 g) -b^3: 14379 New root: 78 New remainder: 14379 ================== New dividend: 14379400 a) /a: 184351 rem1: 22 b) /3: 614503 rem2: 1 b = 7 d) : 63603 b = 7 d) : 63603 e) *3: 190810 f) *a: 1488340 g) -b^3: 1487997 New root: 787 New remainder: 1487997 ================== New dividend: 1487997152 a) /a: 1890720 rem1: 512 b) /3: 6302400 rem2: 0 b = 8 d) : 0 b = 8 d) : 0 e) *3: 0 f) *a: 512 g) -b^3: 0 New root: 7878 New remainder: 0 ==================

## References[edit | edit source]

- ↑ Knott, Cargill G. (1886), "The Abacus, in its Historic and Scientific Aspects",
*Transactions of the Asiatic Society of Japan*,**14**: 18–73