Some Standard Programs for the Minsk-1 Computer

N. S. GOLOSOV, O. K. GORDEEV
Submitted 1969 | SovietRxiv: ru-196901.10018 | Translated from Russian

Abstract Generated abstract

This paper presents standard programs for the Minsk-1 computer intended to simplify engineering computations involving complex variables within the Universal Interpreting System. It describes a complex arithmetic program, the Z-program, which redirects the system’s arithmetic pseudocodes to operate on floating-point complex numbers while preserving ordinary logical operations with specified exceptions. The paper then gives a program for finding roots of polynomials with real or complex coefficients, using Newton iteration in the complex plane and storing the resulting roots in the coefficient locations. The authors argue that representing complex operations through ordinary pseudocodes permits a compact implementation, including a reusable polynomial-root subprogram with adjustable accuracy.

Full Text

SOME STANDARD PROGRAMS FOR THE MINSK-1 COMPUTER

N. S. GOLOSOV, O. K. GORDEEV

(Presented by the scientific seminar of the computing laboratory of TPI)

It is often necessary to solve engineering problems in a complex domain of variation of the variables. This causes certain difficulties when programming such problems on the Minsk-1 computer. The SP developed for performing arithmetic operations with complex numbers in the system of the universal IS [1] (UIS) makes it possible, on the one hand, to simplify considerably the process of programming problems and, on the other, to write the program more compactly and logically. An example of this is the SP for finding the roots of a polynomial of degree \(n\) with complex or real coefficients, presented in the second part of the article.

Program for arithmetic operations with complex numbers (\(Z\)-program)

The program is arranged as a standard program in the UIS system. Its essential feature is that it is closely connected with the operation of the UIS itself, since after a call to the \(Z\)-program all arithmetic pseudocodes of the UIS are executed as operations with complex numbers in floating-point form, written in four cells:

\[ \begin{array}{rcll} A+0 & & p & \left.\begin{array}{l} \end{array}\right\} Rez \\[-2pt] A+1 & & q & \\[2pt] A+2 & & p & \left.\begin{array}{l} \end{array}\right\} Imz \\[-2pt] A+3 & & q & \end{array} \left\} z .\right. \]

The executive address of the arithmetic-operation pseudocodes is \(A+0\), i.e., the order of the real part of \(z\).

The call to the \(Z\)-program is common to all SPs in the UIS system, with the feature that it does not require sending numbers into working cells. Exit from the \(Z\)-program is carried out by executing the special command: 05 0306 0137, after which the UIS executes the following arithmetic pseudocodes with real numbers.

It should be noted that after the \(Z\)-program is enabled, logical pseudocodes are executed in the same way as before it was enabled, with the exception of 02, 04, which are executed according to the sign and according to the number of the complex part of the pseudo-accumulator.

Appendix: Program

Address COP $A_1$ $A_2$
1000 05 1016 0131
1 34 0111 0111
2 05 0116 1044
3 05 0112 0206
4 05 0306 0131
5 C6 0110 0137
6 54 1011 0000
7 16 0001 1044
1010 24 1040 0116
1 16 0005 1044
2 −26 1033 0116
3 −20 0016 1017
4 10 1014 0010
5 24 0132 0112
6 34 [[unclear: 10?2]] 0150
7 00 0000 0000
1020 34 1021 1021
1 16 0223 1044
2 54 1030 0000
3 −01 0223 1044
4 36 0006 0000
5 −37 0167 0000
6 −36 1043 0013
7 24 1013 0116
1030 −07 1026 0137
1 11 0137 1050
2 24 0172 0116
3 07 0000 2030
4 16 0222 1044
5 54 1?45 0000
6 16 0006 1044
7 −26 1052 0116
1040 20 0016 1044
1 10 1041 0010
2 24 0132 0112
3 07 0000 2034
4 00 0000 0000
5 −16 0000 0206
6 24 1000 0112
7 03 3067 0000
1050 03 3057 0000

Continuation

Address COP $A_1$ $A_2$
1 03 3060 0000
2 07 2034 0000
3 −01 0003 0031
4 −01 0003 0033
5 10 2030 0034
6 10 2032 0036
7 34 1034 1034
1060 13 2030 4030
1 07 2022 0026
2 13 2032 4032
3 10 6026 0026
4 12 2026 0030
5 12 2026 0032
6 −01 0003 0033
7 13 2032 4036
1070 07 2022 0026
1 13 2034 0032
2 13 2030 4034
3 11 6026 0034
4 13 2030 4036
5 10 6032 0036
6 34 1034 1034

Program for computing the roots of a polynomial

Address COP $A_1$ $A_2$
1000 05 0112 0111
1 16 0005 1015
2 20 9022 1015
3 24 1004 1051
4 16 0005 1027
5 20 0023 1027
6 20 1110 1063
7 10 1007 0010
1010 24 0112 0112
1 05 2000 1104
2 07 2020 1136
3 07 2000 1120
4 07 3136 1132
5 00 2004 0000
6 16 6000 0000
7 07 2000 1122
1020 07 3136 1126
1 11 2000 1132

Continuation

Address KOP $A_1$ $A_2$
2 13 3122 5116
3 −10 6000 1122
4 13 3116 1126
5 −13 2000 5132
6 10 7126 1126
7 06 3122 5116
1030 13 3122 5116
1 −10 6000 1122
2 12 3126 1122
3 −01 0003 0037
4 13 7122 1126
5 11 3122 1116
6 05 0306 0131
7 −07 0146 1126
1040 11 3112 5126
1 04 3014 1042
2 05 2002 0000
3 −07 3116 0034
4 06 0001 0035
5 11 3114 4034
6 04 3050 1047
7 −07 1140 3116
1050 06 3043 0002
1 00 2004 0000
2 16 6000 0000
3 07 3116 0034
4 −10 6000 1122
5 06 0001 0037
6 11 7112 4000
7 04 3061 1060
1060 15 0000 1124
1 −07 1122 2000
2 −13 1116 6000
3 06 3054 0000

Continuation

Address KOP $A_1$ $A_2$
4 −07 1116 2000
5 05 0306 0131
6 01 1106 1027
7 01 1106 1063
1070 −01 0003 1121
1 11 2000 1136
2 11 6000 4000
3 −16 0000 0022
4 02 3075 1077
5 51 1121 0000
6 04 3013 1014
7 01 1107 0302
1100 −01 0003 1123
1 −01 0003 1125
2 −07 1122 2000
3 −07 1124 2002
4 00 0000 0000
5 05 1111 0112
6 00 0000 0004
7 00 0004 0000
1110 00 0033 0000
1 00 0000 0000
2 −00 0000 0024
3 40 0000 0000
4 −00 0000 0021
5 40 0000 0000
6 00 0000 0001
7 62 2077 3250
1120

1120–1141—working cells.

The program occupies 77 cells and makes it possible, without disturbing the generality of the programming process in the UIS system, to perform the necessary operations with complex numbers. Working cells: 0020–0037.

Finding the roots of a polynomial of the $n$-th degree

The roots of a polynomial of the form

$$ P_n(z)=z^n+a_1z^{n-1}+\ldots\ldots\ldots+a_{n-1}z+a_n, $$

where $a_1, a_2, \ldots, a_n$ are always written in complex form (if $a_n$ are real, then the imaginary part is zero), are found by iteration-

by Newton’s process in the complex domain of variation of \(Z\), by the formula [2]:

\[ z_{n+1}=z_n-\frac{P_n(z_n)}{P'_n(z_n)} . \]

\(P'_n(z_n)\) is the derivative computed at the point \(z_n\). The call to the SP is common to all subprograms in the UIS system:

I II
COP address address
\(N_{\mathrm{TX}}\) \(2000 + A_1\) \(A_2\),

where \(\langle A_1\rangle\): \(p\) is the order; \(\langle A_1+1\rangle\): \(q\) is the mantissa; \(n\) is the degree of the polynomial,

\(\langle A_2\rangle\) 00 0000 \(A\,a_1\)
\(\langle A_2+1\rangle\) 06 0000 \(A\,a_{n-1}\)

\(A a_1,\ A a_{n-1}\) are the addresses of the first and the \(n-1\)-st coefficients. The roots of the polynomial are placed in the positions of the coefficients. The accuracy of root finding \((10^{-6})\) is specified in cells 1112, 1114 and may be changed if desired.

In the computations this program uses the \(Z\)-program, which must have pseudocode 16, i.e. the first line is TX. The program is completely restored after operation and can be used for repeated calls.

The program length is \((n-1)=141\); the length of the computing part is 0106 cells. As can be seen, reducing arithmetic operations with complex numbers to ordinary pseudocodes made it possible, despite the relative complexity of the problem, to write a compact program.

References

  1. N. S. Golosov, O. K. Gordeev. Universal Interpreting System (UIS). In the present collection.

  2. B. P. Demidovich, I. A. Maron. Foundations of Computational Mathematics. Moscow, 1960.

Submission history

Some Standard Programs for the Minsk-1 Computer