The latest issue of BYTE has on p.223 an article discussing the number of digits of precision carried by the computer in a calculation. A set of programs is presented to allow you to determinethe precision of your computer. The program below and the results of a run on the 2068 show that the precision of the Timex is at most 10-digits.
10 LET n=1
20 LET a=10
30 LET b=a+1
40 LET c=b-a
50 PRINT n;TAB 4;c
60 LET a=a*10
70 LET n=n+1
80 IF n<12 THEN GO TO 30
1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 0 11 0
What if you want to multiply two numbers that will result in a product having more than ten digits?
If you want to do handle more digits a general purpose code is needed. The following code will multiply any two terms having any number of digits. I have used it to check the result of a procedure that took many hours on the world’s fastest computer. The two terms to be multiplied are the prime factors of the largest number to be factored. See how long it takes your Timex to put them back together again. You will note that the product obtained is a very simple number.
The Jan. 1985 issue of Byte has an extensive article on page 211 about variable precision calculator programs.
Roald A. Schrack
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.