Translating abacus procedure to wikitables

edit

awk code

edit
BEGIN {
    FS="|";
    print "<div style=\"font-family:Courier; line-height: 1.10em;\">";
    print "{| class=\"wikitable\"";
    print "|+ Caption text";
    print "|-";
    print "! Abacus !! Comment";
}
{
    sub(/\ *$/,"",$1)
    gsub(/\ /,"\&nbsp;",$1);
    print "|-";
    print "| " $1;
    print "| " $2;
}
END {
    print "|}</div>";
}

Data used

edit
 ABCDEFGHIJKLM|
    4567890123|Entering radicand starting in CD (first group)
  2           |First root digit in B
   -4         |Subtract square of B from first group
  2  567890123|Null remainder
  4  567890123|Doubling B. Appending next group to remainder
  41 567890123|5/4≈1, try 1 as next root digit
    -4        |Continue division by 41, subtract 1✕41 from EF
     -1|
  41 157890123|15 as remainder
  42 157890123|Double second root digit
  42 157890123|Append next group
  423157890123|157/42≈3, try 3 as next root digit
    -12       |Continue division by 423, subtract 3✕423 from E-H
     -06|
      -09|
  423 30990123|309 as remainder
  426 30990123|Double third root digit
  426 30990123|Append next group
     etc.|

Generated code

edit
<div style="font-family:Courier; line-height: 1.10em;">
{| class="wikitable"
|+ Caption text
|-
! Abacus !! Comment
|-
| ABCDEFGHIJKLM
| 
|-
|    4567890123
| Entering radicand starting in CD (first group)
|-
|  2
| First root digit in B
|-
|   -4
| Subtract square of B from first group
|-
|  2  567890123
| Null remainder
|-
|  4  567890123
| Doubling B. Appending next group to remainder
|-
|  41 567890123
| 5/4≈1, try 1 as next root digit
|-
|    -4
| Continue division by 41, subtract 1✕41 from EF
|-
|     -1
| 
|-
|  41 157890123
| 15 as remainder
|-
|  42 157890123
| Double second root digit
|-
|  42 157890123
| Append next group
|-
|  423157890123
| 157/42≈3, try 3 as next root digit
|-
|    -12
| Continue division by 423, subtract 3✕423 from E-H
|-
|     -06
| 
|-
|      -09
| 
|-
|  423 30990123
| 309 as remainder
|-
|  426 30990123
| Double third root digit
|-
|  426 30990123
| Append next group
|-
|     etc.
| 
|}</div>

Generated table

edit

After changing caption:

Starting the square root of 4.567890123
Abacus Comment
ABCDEFGHIJKLM
   4567890123 Entering radicand starting in CD (first group)
 2 First root digit in B
  -4 Subtract square of B from first group
 2  567890123 Null remainder
 4  567890123 Doubling B. Appending next group to remainder Note
 41 567890123 5/4≈1, try 1 as next root digit
   -4 Continue division by 41, subtract 1✕41 from EF
    -1
 41 157890123 15 as remainder
 42 157890123 Double second root digit
 42 157890123 Append next group
 423157890123 157/42≈3, try 3 as next root digit
   -12 Continue division by 423, subtract 3✕423 from E-H
    -06
     -09
 423 30990123 309 as remainder
 426 30990123 Double third root digit
 426 30990123 Append next group
    etc.


Abacus diagram

edit

   9 18  8  0  0  1              9  9  9
╔═════════════════════════════════════════╗
║  │  │  │  ●  ●  ●  ●  ●  ●  ●  │  │  │  ║
║  │  │  │  │  │  │  │  │  │  │  │  │  │  ║
║  ●  ●  ●  │  │  │  │  │  │  │  ●  ●  ●  ║
╠═════════════════════════════════════════╣
║  ●  ●  ●  │  │  ●  │  │  │  │  ●  ●  ●  ║
║  ●  ●  ●  │  │  │  │  │  │  │  ●  ●  ●  ║
║  ●  ●  ●  ●  ●  │  ●  ●  ●  ●  ●  ●  ●  ║
║  ●  │  │  ●  ●  ●  ●  ●  ●  ●  ●  ●  ●  ║
║  │  │  │  ●  ●  ●  ●  ●  ●  ●  │  │  │  ║
║  ●  ●  ●  ●  ●  ●  ●  ●  ●  ●  │  │  │  ║
║  │  ●  ●  ●  ●  ●  ●  ●  ●  ●  ●  ●  ●  ║
╚═════════════════════════════════════════╝
   A  B  C  D  E  F  G  H  I  J  K  L  M  

Caption text
Header text Header text

   9 18  8  0  0  1              9  9  9
╔═════════════════════════════════════════╗
║  │  │  │  ●  ●  ●  ●  ●  ●  ●  │  │  │  ║
║  │  │  │  │  │  │  │  │  │  │  │  │  │  ║
║  ●  ●  ●  │  │  │  │  │  │  │  ●  ●  ●  ║
╠═════════════════════════════════════════╣
║  ●  ●  ●  │  │  ●  │  │  │  │  ●  ●  ●  ║
║  ●  ●  ●  │  │  │  │  │  │  │  ●  ●  ●  ║
║  ●  ●  ●  ●  ●  │  ●  ●  ●  ●  ●  ●  ●  ║
║  ●  │  │  ●  ●  ●  ●  ●  ●  ●  ●  ●  ●  ║
║  │  │  │  ●  ●  ●  ●  ●  ●  ●  │  │  │  ║
║  ●  ●  ●  ●  ●  ●  ●  ●  ●  ●  │  │  │  ║
║  │  ●  ●  ●  ●  ●  ●  ●  ●  ●  ●  ●  ●  ║
╚═════════════════════════════════════════╝
   A  B  C  D  E  F  G  H  I  J  K  L  M  

Example

Math

edit

 

Traditional Abacus Techniques

edit

Table of content

edit
  • Foreword
  • Traditional versus modern methods
  • The principle of least effort
  • Addition and subtraction
    • Learning addition and subtraction
    • Use of the 5th lower bead
  • Division
    • Modern and traditional division; close relatives
    • Guide to traditional division (帰除法)
    • How to learn the division table
    • Dealing with overflow
    • Specialized division tables
    • Division by powers of two
    • Traditional division examples
  • Multiplication
  • Roots
    • Square root
    • Cube root
    • A non-traditional method
  • Practicing without exercise sheets
    • The 123456789 exercise
  • Abbreviated operations

Suanpan article (contrib)

edit

The most mysterious and seemingly superfluous fifth lower bead, likely inherited from counting rods as suggested by the image above, was used to simplify and speed up  addition and subtraction somewhat, as well as to decrease the chances of error[1]. Its use was demonstrated, for example, in the first book devoted entirely to suanpan: Computational Methods with the Beads in a Tray (Pánzhū Suànfǎ 盤珠算法) by Xú Xīnlǔ 徐心魯 (1573, Late Ming Dynasty)[2]. The following two animations show the details of this particular usage:[3]

  1. ^ Chen, Yifu (2018). "The Education of Abacus Addition in China and Japan Prior to the Early 20th Century". Computations and Computing Devices in Mathematics Education Before the Advent of Electronic Calculators. Springer. pp. 243-. ISBN 978-3-319-73396-8.
  2. ^ Suzuki, Hisao (1982). "Zhusuan addition and subtraction methods in China". Kokushikan University School of Political Science and Economics (in Japanese). 57 – via Kokushikan.
  3. ^ "A short guide to the 5th lower bead" (PDF). 算盤 Abacus: Mystery of the bead. 2020. Archived (PDF) from the original on 2021-02-01. Retrieved 2021-07-07. {{cite web}}: |archive-date= / |archive-url= timestamp mismatch; 2021-01-26 suggested (help)

Subpages

edit

Testing a reference to a subpage.