2018年2月15日 星期四

Calculation


Ching-Tang Tseng
 Hamilton, New Zealand
16 February 2018
ilikeforth@gmail.com
http://forthfortnight.blogspot.com

Computer is adept in calculation. After Internet applications via computers grew up comprehensively, calculation ability in a computer was almost forgotten by people. In fact, no matter computer is to be used for data transfer or for data treatment, huge amount and high speed calculation abilities are still must to be emphasized inevitably. Calculation is an intrinsic feature of computer.

Here, I’d like to talk about some human calculation habits by the Chinese. We Chinese deal with calculation affairs are a little bit different from others. 

1. + and -


Everybody knows Chinese abacus. It is one kind of calculating tool, pretty convenient for applying to addition and subtraction calculations, and convenient for the purpose of remembering the calculation results as well. Abacus doesn’t care about too much application in multiplication and division calculation aspects but can do it as well. Nowadays, abacus position has been replaced by the computer in the Chinese environment.  

There is not so much difference in doing addition and subtraction calculations among Chinese and others. Only one thing is worth to emphasize: Owing to the using of abacus, it makes Chinese felt out that CARRY operation ought to remember in their mind. It doesn’t have to put carry mark on any other place. 

Whether after a calculation has to do a carry operation or not? It is dependent on after to compare last one digit with the original two numbers. When the last one digit after doing an addition, result is less than any one of its original two numbers, you should do a carry operation. I used this conception to design my program in multiple cells big number addition calculation. This idea is based on the abacus using concept. The meaning of last digit is corresponding to the number in the least significant cell.

Shortly say an example: when you are doing the following calculation.

5 + 7 = 12

The last one digit of the result is 2, it is constantly less than 5 or 7, so you must to do a carry operation, otherwise need no carry operation vice versa. A simple high level definition for D+ design as following:

\ High level D+, D-
\ Author: Ching-Tang Tseng
: hd+ ( d1 d2 -- d3 )
 >r swap >r dup >r 
 + dup r> u< negate
 r> + r> + 
;

: hd- ( d1 d2 -- d3 )
 dnegate hd+ ;

Code in hd+, there is a key point worth to explain.  Recent Forth Standard changed the true value from 1 to -1, false value is still kept to be 0. We are able to use one NEGATE operation to replace a tedious logic branch treating code over there. U< will generating 0 or -1 only, after NEGATE operation, gives you 0 or 1, straightly and exactly correct for the requirement of doing a carry operation. Such a conception can be applied to addition operations of multiple cells big numbers,  the same as to do a multiple digits addition operations.

These two pictures show you two kinds of abacus. 

Picture 1



Small abacus in picture 1 is made from plastic material, with one row on the top part, every one pearl represents a 5, with 4 rows on the bottom part, each one pearl represents a 1. We called it a simplified abacus.


Picture 2



Big abacus in picture 2 is made from wood and bamboo material, with two rows on the top part, each one pearl is still represented a 5, another one 5 could be applied to do the money exchanging, with 5  rows on the bottom part, each one pearl is still represented one 1. This kind of abacus is a real traditional Chinese abacus. Chinese had abacus for more than thousand years. Value 168.25 had been dialed on both abacuses when I took these pictures.

Before 1960, in my memory, I am still remembered that Chinese merchants in the morning fresh vegetable market still used a very convenient five columns abacus. It is small enough, can be held in one hand, and can be kept in the pocket. This kind of abacus is helpful to batch trading of commodity, can help out busy cash money counting. 

2. * and /


How Chinese to do their multiplication (also imply division calculation) calculation in their daily life? I may submit some special features to everybody for reference. 

All Chinese should be able to recite their multiplication table (abbreviated as 9x9 table) after they grew up to 10 years old. This ability comes from an item in their compulsory educational system. Chinese believed that this item will be applied to do calculations in his or her whole life. People in other countries maybe don’t have to learn this item, then they are unable doing the multiplication calculation as a Chinese did.

There are some reasons let Chinese more easily than others to recite their multiplication table.

First, Chinese pronunciation to every word is single syllable, all single digital numbers included as well. Other people maybe are not. For example, in English, pronunciation of numbers: 0 3 5 6 7 8 are not single syllable.  This difference makes Chinese more apt to remember their 9x9 multiplication table.

Secondary, Chinese let their recital pronunciation has equal syllable amount to every sentence. Under such a condition, it makes people reciting sentences to be sounded like the same as to recite a poem. This reciting manner certainly can increase Chinese 9x9 multiplication table recalled power.

Third, number bases of counting and writing in Chinese are decimal. In English are duodecimal. This difference makes using Chinese more easily than using English to recite the multiplication table. 

Single syllable could save a lot of time for Chinese in their life while counting. Single syllable recite 9x9 multiplication table could save a lot of calculating time as well. 

I would like to introduce the fundamental spirit of Chinese recite 9x9 multiplication table, and write it in English. But I have to modify all non-single syllable number’s pronunciation to single syllable. And change non-decimal English number's name to decimal Chinese format name. 

The following English listing parts are absolutely not the formal English. It is just an English pronounced Chinese customary sentence.  I am not going to destroy inherent English names of number, just want to use it for convenient purpose to introduce.

3 : three  change to ti
5 : five   change to fi
6 : six    change to si
7 : seven  change to se
8 : eight  change to ei
0 : could be ignored, x0 replaced by xxx ten.

Then, reciting Chinese 9x9 multiplication table to be represented and pronounced in English will be changed as following:

2 x 1 = 2         two one   get two
2 x 2 = 4         two two   get four
2 x 3 = 6         two ti    get si
2 x 4 = 8         two four  get ei
2 x 5 = 10        two fi    one ten
2 x 6 = 12        two si    one ten two
2 x 7 = 14        two se    one ten four
2 x 8 = 16        two ei    one ten si
2 x 9 = 18        two nine  one ten ei

3 x 1 = 3         ti    one     get ti
3 x 2 = 6         ti    two     get si
3 x 3 = 9         ti    ti         get nine
3 x 4 = 12        ti    four    one ten two
3 x 5 = 15        ti    fi      one ten fi
3 x 6 = 18        ti    si      one ten ei
3 x 7 = 21        ti    se      two ten one
3 x 8 = 24        ti    ei      two ten four
3 x 9 = 27        ti    nine    two ten se

4 x 1 = 4         four  one    get four
4 x 2 = 8         four  two    get ei
4 x 3 = 12 four  ti     one ten two
4 x 4 = 16 four  four   one ten si
4 x 5 = 20 four  fi     two ten
4 x 6 = 24 four  si     two ten four
4 x 7 = 28 four  se     two ten ei
4 x 8 = 32 four  ei ti  ten two
4 x 9 = 36 four  nine   ti  ten si

5 x 1 = 5         fi     one     get  fi
5 x 2 = 10       fi     two     one  ten
5 x 3 = 15       fi     ti      one  ten fi
5 x 4 = 20 fi     four    two  ten
5 x 5 = 25 fi     fi      two  ten fi
5 x 6 = 30 fi     si      ti   ten
5 x 7 = 35 fi     se      ti   ten fi
5 x 8 = 40       fi     ei      four ten
5 x 9 = 45       fi    nine     four ten fi

6 x 1 = 6         si     one      get  si
6 x 2 = 12 si     two      one  ten two
6 x 3 = 18 si     ti       one  ten ei
6 x 4 = 24 si     four     two  ten four
6 x 5 = 30 si     fi       ti   ten
6 x 6 = 36 si     si        ti   ten si
6 x 7 = 42 four   se        four ten two
6 x 8 = 48 si     ei        four ten ei
6 x 9 = 54 si     nine      fi   ten four

7 x 1 = 7         se    one       get  se
7 x 2 = 14 se    two       one  ten four
7 x 3 = 21 se    ti        two  ten one
7 x 4 = 28 se    four      two  ten ei
7 x 5 = 35 se    fi        ti   ten fi
7 x 6 = 42 se    si        four ten two
7 x 7 = 49 se    se        four ten nine
7 x 8 = 56 se    ei        fi   ten si
7 x 9 = 63 se    nine      si   ten ti

8 x 1 = 8         ei     one       get  ei
8 x 2 = 16 ei     two       one  ten si
8 x 3 = 24 ei     ti        two  ten four
8 x 4 = 32 ei     four      ti   ten two
8 x 5 = 40 ei     fi        four ten
8 x 6 = 48 ei     si        four ten ei
8 x 7 = 56 ei     se        fi   ten si
8 x 8 = 64 ei     ei        si   ten four
8 x 9 = 72 ei     nine      se   ten two

9 x 1 = 9         nine one      get  nine
9 x 2 = 18 nine two      one  ten ei
9 x 3 = 27 nine ti       two  ten se
9 x 4 = 36 nine four     ti   ten si
9 x 5 = 45       nine fi       four ten fi
9 x 6 = 54 nine si       fi   ten four
9 x 7 = 63 nine se       si   ten ti
9 x 8 = 72 nine ei       se   ten two
9 x 9 = 81 nine nine     ei   ten one

In general, Chinese calculation speed was better than others. Many reasons had been discussed above. In fact, the real reason was not only based on Chinese number conception, but also was that they were doing practice a lot for a long period of time in their primary school years.

When I attended primary school, we used to use one kind of plastic sub plate while writing, to cope with  the problem of rough surface on the wooden desk.  On the plate, there were always printed a 9x9 multiplication table, a table of Chinese sound element marks, and a table of English letters. The following picture 3 shows you such a typical plastic sub plate.

Picture 3


Chinese sound element marks is also a very important tool in our life. My Chinese typing speed is fast enough; owing to I am familiar with the usage of Chinese sound element marks correspondent positions on the keyboard. These marks are the real formal and real traditional marks. But China Communists rejected to accept it. Communists used Latin letters to be their sound marks. Lived on non-Communists control area's Chinese doesn’t like it, me too. 

Unfortunately, tragedy happened in Taiwan recently  as well. Non-Chinese controlled government executes their cultural revolution. Destroy all Chinese culture are their policy. This sound marks table is about to vanish. Taiwanese executed educational revolution for more than 20 years, now, many students in the university are thinking that 1/3 + 1/2 = 2/5.   

Courtesy of Dr. Ting’s code contribution, a multiplication table can be printed out by FORTH program as following. Another ABC FORTH style code was rewritten by me. Their executing results to be demonstrated in the video are attached for reference.   Program was running in Lina64 FORTH system under Ubuntu v.16.04 OS.

\ Multiplication table
\ Author: Dr. Ting
: onerows ( n -- )
        CR
        DUP 3 .R 3 SPACES
        13 1
        DO      I OVER *
                4 .R
        LOOP
        DROP ;

: table1 ( -- )
        CR  CR  6 SPACES
        13 1
        DO      I 4 .R  LOOP    ( display column numbers )
        13 1
        DO      I onerows
        LOOP
        ;

: u.r ( u n -- )
 >r 0 <# #s #>
 r> over - spaces
 type ;

9 value maxn

: table2 ( – )
  cr 2 spaces  maxn 1+ 1 do i 4 u.r loop
  cr
  maxn 1+ 1 do
    cr i 2 u.r
    maxn 1+ 1 do
       i j * 4 u.r
    loop
  loop ;

\ ABC FORTH style multiplication table
\ Author: Ching-Tang Tseng

3 integers I J K

: table3 ( -- )
BASIC
10 RUN CR 2 SPACES
20 FOR I = 1 TO maxn
30 RUN I 4 U.R
40 NEXT I
50 RUN CR
60 FOR J = 1 TO maxn
70 RUN CR 2 SPACES
80 FOR I = 1 TO maxn
90 LET K = I * J
100 RUN K 4 U.R
110 NEXT I
120 NEXT J
130 END
;

Multiplication table could be printed out by table1, table2, table3. 
In table1, dimensions are fixed to 12x12. 
A VALUE maxn = 9  has been used for table2 and table3, 9x9 multiplication table could be printed out by both of them. Maxn is an adjustable value.  

Video


3. Conclusion


The development of scientific and engineering technology need excellent calculations. The personal foundation of calculations is built on the simplest 4 mathematical operations: +, -, *, and /. Everybody has to use them for all life long. 

Courtesy of NASA (National Aeronautics and Space Administration), an old picture (picture 4) in 1953, shows many Rocket Girls had done a lot calculations for NASA. They said:

In the earliest days of space exploration, most calculations for missions were done by "human  computers" and most of these computers were women. These women's calculations helped the US launch its first satellite, Explorer 1, 60 years ago.

Picture 4



Recently, according to many international medium reports, many countries started to pay attention to the arithmetic educational methods in the elementary school of China. Many people believed that the positive influence of The Chinese 9x9 multiplication table is a very important educational material. I agree.

There are not so many people can pin point out the main special features in Chinese calculations the same as I had talked above. At  least, I had never found it before I posted this article out.

I had ever walked through a long path of calculation, from free hand to abacus, to slid rule, to calculator, to computer, at last, to my ABC FORTH system during the past 60 years. I am able to say some special things out about the calculation, owing to I am a real doer. Many sub system design related to the mathematical calculation had been done by me. Discussion of calculation is an endless topic. Here I had talked a few very fundamental conceptions only. 

This article is posted for our next generation and next... generations, help them to remember gradually disappeared tools and techniques. Everybody is welcome to share it with us.

沒有留言: