Classification of difference-iterative algorithms Clasificación de algoritmos diferenciales-iterativos

This article presents a general classification of difference-iterative algorithms (DIA) which are increasingly being used in microprocessor control systems for industrial, scientific, and technical objects. The classification is based on taking into account the features of the DIA structures (the method of organizing convergence, the order of generating the next increments of iterated quantities, cascading and interaction of several DIA, etc.). The objective of the presented DIA classification is to give microprocessor algorithmic software developers an orientation when choosing known algorithms and prospects when developing new DIA for a specific purpose.


INTRODUCTION
Due to the widespread use of microprocessors (MP) in local automation systems of industrial and scientific facilities, a significant need arose for integer and high-speed algorithms.
Integer arithmetic (without using multiplications and divisions as independent operations) is based, among other things, on the so-called difference-iterative algorithms.
For the first time, difference-iterative algorithms (DIA) were proposed by J.E. Volder (1959) and J.E. Maggit (1962) to calculate certain trigonometric functions.Then, in the works of A.M. Oransky (1977) and his joint inventions with A.L. Reichenberg (Oransky and Reichenberg, 1980), they were improved, among other things, for calculating several algebraic functions.But all these developments were focused on hardware implementation, and therefore did not have a wide application.Their development followed the heuristic path of the appearance of separate algorithms.
The DIA were purposefully developed only after using mathematical models of DIA and their analysis for the deterministic creation of new DIA.This was done in the works of N.S.Anishin (2006) and other scientists (Chastikov and Bulatnikova, 1999).

Structure of DIA
Let's consider the structure of the DIA.It includes a formula for determining the values of the indicator and a number of the same recurrent formulas (operators) for calculating the next values of the iterated quantities at each iteration step.
The indicator is defined as: where   is the element of a subset of the indicator values of the set Q The presence of indicators allows changing the type of operation (addition or subtraction), or cancel several operations of a linear transformation of information (for example, to keep the same value of the iterated quantity).Another important role of indicators is to ensure the non-linearity of the functional transformation of information.This is ensured by testing and conditional transition in programs that implement DIA.
The remaining recurrent formulas (operators) for calculating the current values of iterated quantities have the following form where  −1 is the set of previous values of iterated quantities, including  −1 , С, which is the set of constants and initial values of iterated quantities, including  0 , Q is the set of indicators.
In (Anishin and Bulatnikova, 2006;Chastikov and Bulatnikova, 1999), it is shown that the potential possibility of the DIA-based functional transformation (i.e., without multiplication and division) consists in organizing convergent iterative processes, whose final values of the iterated quantities are equal to the values of the given functions at the given values of their arguments.
As an example, we give a DIA presented below.
where i is the iteration number i=1,2,...,n; n is the binary number of bits (unsigned) of arguments x and y.
The first and second operators in (4) determine the indicator   , and the third one calculates the recurrent value of the desired function The DIA differ significantly by the   indicators, forming process, and the way they are used in other operators of DIA.

Additive decomposition of the quotient of two quantities
This decomposition aims at searching for the quotient of two quantities, for example, x and y as a sum Note that the   determination operators are non-linear due to the first operator (as, for example, in ( 4)).
Ways of using   operators in other q (linear) DIA operators are different.
In one case, they provide a change in the current iterated value by a specific increment (with a + orsign) Or they increase the current iterated value by k times i.e.  = 1 +  −1 and in this case  =  −1 Note that the cases where additive terms of the type represented in ( 6) and ( 7) are observed in the linear or nonlinear operator are not excluded.

Multiplicative decomposition of the quotient of two quantities
In this case, the indicators   are coefficients in the expansion of the quotient of two quantities of the form where  −1 * is the value of the indicator  −1 after the first half of the i-th iteration.To obtain the decomposition (8), the group of the following operators is used where i=1,2,…,n; n is the number of the iteration performed twice.
The algorithm (9) will converge if i.e. within the limits from 0.0834 to 5.6842.
Other ways of using   in the other DIA operators are the same as in section 2.1.They provide the raising of a fraction to natural power, for calculating the logarithm  |   | and the inverse value.

DIA with counterbalancing
An essential feature of such DIA is the determination of the difference between two iterated quantities and tracking the sign of inequality by the formula The   indicators, obtained in this way are used to organize an iterative process involving other iterated quantities, besides   and   .In this case, operators with both additive and multiplicative increments are used.
Here are two such DIA.The first one is with additive increments (Oransky and Reichenberg, 1980).
Note that in some DIA, the totality of all   indicators carry certain valuable information.For example, in DIA (13), the sum of all   is equal to the function The second example of DIA with multiplicative increments of iterated quantities (Bulatnikova and Gershunin, 2015) is: where k is a constant equal to ∏ (1 + 2 − ) −1  =1 , i is the iteration number.
The convergence of DIA ( 15) is provided under the condition that the number x is represented with an even (or zero) order and a mantissa within the interval (2 −2 , 1) (Bulatnikova and Gershunina, 2016).
Here, we note another feature of DIA with counterbalancing.According to ( 9), DIA has two-sided increments, while according to ( 15) it has one-sided increments of counterbalanced iterated quantities.This feature allows classifying such DIA in different ways.The counterbalancing method is independent of the above ability and can be either additive (DIA ( 13)) or multiplicative (DIA ( 15)).

RESULTS AND DISCUSSION
The greatest technical and economic effect when designing algorithmic support is achieved if the DIA is modified for a specific task by varying the initial values of the iterated quantities, as well as the DIA constants and structure (superposition of algorithms).

Mathematical models of DIA
This can be achieved only by owning a mathematical model of DIA, for example, replacing recurrent expressions (operators) with an algebraic expression.Further, transforming algebraic expressions in the right direction, we determine the convergence of DIA and find the desired function.To do this, we performed the following mathematical operations (13): Given that   =   (i.e. the counterbalancing will take place), we have the following algebraic expression: .
Then  = − + .If we take variables, for example, w and u, instead of  0 and  0 , we get 3.2.Building mathematical models of DIA We have considered the simplest DIA.It implements division without restoring the remainder (quasidivision) and multiplication (Oransky, 1977).
Since DIA ( 18) converges (the convergence condition   < 2), then From here From the second DIA operator (18) we have Setting any simplest functions of any arguments to parameters w, v, s, and t (without multiplication and division), we get more complex transformations of information.Further, consider the process of constructing a mathematical model of DIA (11): where , where i=1,2,…,n; n is the iteration number.
Using different variables or functions in place of  0 ,  0 ,  0 и  0 we will get their superpositions, i.e. the desired functional dependence.

An example of an effective DIA modification
Among the known DIA, we selected the DIA (13) which was modified as follows (Bulatnikova and Gershunina, 2016): where i is the iteration number ( i =1, 2, ...n); n is the binary number of bits of the arguments (except for sign).
Simultaneously, we introduce such functions of one variable t in place of  0 ,  0 , w and u To exclude multiplication in ( 23), the coefficients   (  ∈ {, , , }) are chosen to be zero or integer a non-negative degree (1⁄2) with the sign ±  .In this case, the multiplication is replaced by an arithmetic shift of the variable t by | 2 |  || digits (towards the lower digits) with the assignment of the   sign to the result.
The inverse problem is posed (and a method for solving (Chastikov and Bulatnikova, 1999) is specified): to select such coefficients   ,   ( ∈ {, , , }) for a given function F(t) within the interval  ∈ (, ) , so that () ≈   +   • () with some given error (of the order of 0.1-0.01%).Note that the scale factor   is chosen by the absolute value to be equal to 1,2,4,8,... and is reflected as the binary order of the result.
To do this, we find the Pade approximant: Using the method of undetermined coefficients we compose a system of five algebraic equations (some of them are non-linear) with variables   ,   ( ∈ {, , , }).
The accuracy characteristics of DIA (23) with coefficients (31) are given below in the Error Table (Table  1).The Error Table is obtained for the case of n=15the number of MP bits.
Even at the beginning of the era of microprocessors and microcomputers, several scientists (Kagan and Stashin, 1987;Sinha, 1986) stated that most microcomputers and microprocessors lack so-called long operations (multiplication and division), and their software implementation requires a lot of time.Therefore, it is advisable to use information processing methods that do not contain such operations, or, in extreme cases, these operations are not included in the main cycle of calculating increments.
These requirements are fully met by DIA.Being integer and high-speed, they are well combined with the microprocessor architecture, providing, along with algorithmic, also the hardware-based fast operation of the microprocessor control systems.

CONCLUSION
The presented classification of DIA provides the designer of the microprocessor algorithmic support with a great prospect in choosing known DIA, and orientation when creating new DIA for specific tasks.

Table 1 .
Error Table.Characteristics [units of lowest order digit]