Abstract:
A division A/B where A and B are represented in a radix D can be accomplished by evaluating a power series. It is very important not only for the power series to converge but also to converge quickly in practical application. Thus, the convergence rate of the power series must be small in order to obtain a reasonably good approximation of the quotient by evaluating the first few terms. The acceleration method that guarantees to give a small convergence rate, 1/(2D-3 ), of the power series (see the section of the related application) was proposed with at most three successive applications of acceleration constants. This invention reduces the convergence rate, 1/(2D-3), to a smaller convergence rate, 1/(2mD-3), in the worst case where m=1,2,2 2 ,2 3 ,2 4 , . . . and the three successive applications of acceleration constants to at most the two successive applications of the constants. These two reductions promise to yield faster division in digital computer.

Description:
CROSS REFERENCE TO RELATED APPLICATIONS 
     Apparatus for digital division computation, Ser. No. 816,595, filed on July 18, 1977, now abandoned in favor of continuation-in-part of application Ser. No. 959,269, filed on Nov. 9, 1978 now U.S. Pat. No. 4,364,115. 
     BACKGROUND OF THE INVENTION 
     The present invention relates to a method and apparatus for division in data processing system and specially for floating point division in radix-2 n  digital computer where n&gt;1. 
     Division by iterative multiplications has been implemented in the division process of digital computer. One technique described in &#34;The IBM System/360 Model 91: Floating-point Execution Unit&#34; IBM Journal of Res. &amp; Develop. Vol. 11 No. 1, 1967 pp. 34-54 by S. F. Anderson et al. treats the dividend and divisor as numerator and denominator of a fraction. It accomplishes the division by multiplying both the numerator and denominator with the same sequence of convergence factors until the denominator approaches approximately unity. The resulting numerator then is considered an approximated quotient. 
     It is assumed the dividend and divisor are positive and normalized fractions in floating point number representation with the range 1&gt;A,B≧1/D where D denotes a radix. This normalized range implies that the divisor can be expressed as B=1-q for some q in the range 0&lt;q≦(D-1)/D. The first multiplying factor is chosen as R o  =1+q then B o  =B×R o  =(1-q)(1+q)=1-q 2 . The second multiplying factor is selected as R 1  =2-B o  =1+q 2  then B 1  =B o  ×R 1  =1-q 4 . In general, at the i th  iteration, R i  =1+q 2 .spsp.i and B i  =1-q 2 .spsp.i+1. Since |q|&lt;1 and q 2 .spsp.i+1 &lt;ε, B i  is an approximated unity where ε represents the least significant bit of the division register in computer. Thus, AR o  R 1  R 2  . . . R i  is the desired quotient. The first multiplier R o , determined by table-lookup, is 10 bits long and yields a minimum 0 or 1 string length of seven bits in B o , namely 0.1111111xxx . . . or 0.0000000xxx . . . where x is 0 or 1. 
     This technique is essentially an power series evaluation of 1/B: 
     
         1/B=1/(1+q)D=(1-q)(1+q.sup.2)(1+q.sup.4)(1+q.sup.8)(1+q.sup.16)(1+q.sup.32). . . /D 
    
     where B=(1+q)D and 0&lt;q≦1/(D-1). For 56-bits fraction, five multiplying factors, R o , R 1 , R 2 , R 3 , and R 4  (=1+q 2 .spsp.i for i=1,2,3,4), are needed. 
     The acceleration method described in the related application was proposed to obtain a smaller value q from a given divisor. Then, the power series evaluation can be accomplished with a fewer number of multiplying factors with the smaller value where |q|≦1/(2D-3) was guaranteed. In the acceleration method, three successive applications of acceleration constants are needed in order to obtain the smaller value q. 
     SUMMARY OF THE INVENTION 
     An object of this invention is to provide an improved high-speed division mechanism in radix-2 n  machine. 
     A further object of this invention is to implement a low-cost mechanism in division apparatus that performs high-speed division. 
     Dividend A and divisor B that are multiplied by successive acceleration constants result in Aa o  a 1  a 2  /Ba o  a 1  a 2  and the constant multiplied divisor is of the form Ba o  a 1  a 2  =D n+i  (1+q i  /D n+i ) by using the iterative mapping function defined herein where i denotes the i th  iteration and D is a radix. Note: The multiplication of a 2  (=(mD-1)/m) is accomplished by digit shift and subtraction. 
    
    
     BRIEF DESCRIPTION OF THE DRAWING 
     FIG. 1 depicts the boundary between subdivisions S a  and S a+1  which are defined herein. 
     FIG. 2 is a table of the s-subdivision with D=8 and m=2. 
     FIG. 3 is an operational block diagram indicating a performing logic of iterative multiplications of the acceleration constant to dividend A and divisor B. 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     Since this invention is an improvement of the invention described in the section of Cross Reference to related applications, the previous invention is summarized here. 
     A division A/B may be evaluated through the power series: ##EQU1## where D is the radix (|D|&gt;1), B=D+P, and |P/D|&lt;1. The power series involves no division operation (1/D n  is a shift). The ratio |P/D| must be small for fast convergence. 
     Let the divisor B be in the domain (D n ,D n+1 ) where D and D n  are base radix and pseudoradix respectively. Then B=D n  +q o , where q o  =P for P&gt;0 and q o  =D n+1  -D n  +P for P&lt;0. When P=0, A/B is reduced to a shift operation. The ratio P/D n  to be used in eq. (2.1) is represented by a function of q: ##EQU2## 
     We introduce an overrelaxation parameter a in eq. (2.2.b) as follows: ##EQU3## The suffix n is an argument of the function and may be omitted for simplicity. By imposing -g(q + , a+1)=g(q + ,a) to determine the value of q + , which is the boundary of subdivisions S a  for a=1,2,3, . . . ,D-1, the following results are obtained ##EQU4## where D&#39; denotes an appropriate pseudoradix. 
     By substituting eq. (2.4) into eq. (2.3), the local maxima of g(q,a) in the subdivisions (i.e., the maximum ratios of P/D&#39;) are 
     
         -g(q.sup.+ (a), a)=1/(2a+1) at a=1,2,3, . . . ,D-1.        (2.6) 
    
     FIG. 1 shows the area near the boundary between the subdivisions S a  and S a+1 . 
     An iterative contracting map has been introduced by starting with q o  and recursively applying q i+1  =-g(q i , a i  +1)D n . The movement of q o  through the contracting mapping results in the subdivisions S D-1  where the smallest ratio P/D&#39;-- i.e., q f  =g(q*, D-1) in the domain [D n+i , D n+i+1  ]-- is obtained where i denotes the number of iterations. The q* denotes the very last q value in the recursive mapping; we can find this smallest ratio from eq. (2.6) with a=D-2. 
     Next, a generalized process of the method is described. A generalized parameter (ma+j)/m is proposed for the overrelaxation where m=1,2,2 2 ,2 3 , . . . ,D, and j is an integer m&gt;j≧0. When m=1 and j=0, or m=1 and j=1, the parameter (ma+j)/m becomes a or a+1, respectively. This generalization thus includes the method discussed in the previous section. Moreover, the multiplication ma and the division 1/m of the new parameter can be accomplished only by digit shift operations. Therefore, the use of the generalized parameter in the overrelaxation does not increase the number of multiplications in computing the reciprocal of divisor B. 
     Let us consider a boundary of subdivisions defined by eqs. (2.5). By taking the average of parameters a and a+1 (i.e., (2a+1)/2) we find that the function g(q,(2a +1)/2) intersects the abscissa at the point marked by M 2 ,1 a , shown in FIG. 1. Furthermore, the intersecting point found from -g(q + , a+1)=g(q + , a) is the boundary between subdivisions S a  and S a+1 . The number of subdivision intervals increases from D to 2D-1 when we adopt the averaged parameter. A new narrower interval like this is called a sub-subdivision. The lower/upper boundaries of a sub-subdivision are ##EQU5## from conditions, -g(q L   + ,(ma+j+1)/m)=g(q L   + ,(ma+j)/m) and -g(q U   + ,(ma+j)/m)=g(q U   + , (ma+j-1)/m) respectively, where m=2 l  and m-1≧j≧0 for a=1,2,3, . . . ,D-1 when l=1. There is, however, an exception in that the upper boundary of S 1  is D&#39;(D-1). The left-most sub-subdivision (a=D and j=0) is bounded by [0,D&#39;/(2mD-1)]. We shall abbreviate sub-subdivision as s-subdivision (l=1) and sub-sub-subdivision as 2s-subdivision (l=2), . . . , and a 2 l  -subdivided sub- . . . sub-subdivision as ls-subdivision. Thus, the domain [0,D&#39;(D-1)] of q is divided into the following ls-subdivisions: ##EQU6## with the parameter (ma+j)/m=(2 l  a+j)/2 l . The boundary q L   +  (a,j,m) is depicted in FIG. 1 with points marked by M 2m ,2j+1 a  where m=1 and j=0 for a subdivision; m=2 and j=0,1 for a s-subdivision; and m=4 and j=0,1,2,3 for a 2s-subdivision. 
     Next, consider the mapped value of q computed from g(q,(ma+j)/m). By substituting eq. (3.2) into g(q,(ma+j)/m), we obtain the value of q as follows: ##EQU7## As eq. (3.4) shows, the value of q decreases as the value of m increases. The worst case of q f  for a fixed value m is obtainable as ##EQU8## by setting a=D-1 and j=m-1 in eq. (3.4). 
     The recursive application of q i+1  =h(q i ,(mat 1  +j i )/m)=-g(q i ,(ma i  +j i  +1)/m)D n   by starting with the initial value q o  in S.sub.(ma.sbsb.o +j .sbsb.o.sub.)/m assures the movement of successive mapping images of q o  into the ls-subdivision S( mD-1 )/m (when a=D-1 and j=m-1) or S D . As soon as the last contracting image q* is reached in S.sub.(mD-1)/m or S D , the smallest quantity q f  is evaluated from q f  =-g(q*,(mD-1)/m) or q f  =q*, depending on whether it has been reached in S.sub.(mD-1)/m or S D , respectively, 
     We have been discussing the first benefit of the generalized method. The second benefit is described below. Consider the difference between two values of q computed from g(q,(2ma+2j+1)/2m) and g(q,(ma+j)/m). The difference is (D n  +q)/2mD n+1 , which can be seen in FIG. 1 as 1/(4a+3) indicated by a brace when m=2 and j=1 are used. From this, we may introduce a modified mapping function h m  (q,a) where the suffix m denotes the modification: ##EQU9## 
     The mappings by h m  (q,(ma+j)/m) for the cases m=2 and j=1, and m=2 and j=0 are indicated in FIG. 1 with the shaded triangles. The largest mapped values for each case occur at the points of M 2 ,1 A  and M 4 ,1 A  on the abscissa. Since h m  (q,(ma+j)/m) is a piece-wise linear mapping, it is sufficient to consider only the largest possible mapped value of q that happens to be the upper boundary of each ls-subdivision obtained through eq. (3.2). 
     Next, we present that the number of recursive applications for the worst case is two. By taking the worst initial q o  =q U   +  (a,j,m), the q 1  value is as follows; ##EQU10## where q o  belongs in S.sub.(ma.sbsb.o +J .sbsb.o.sub.)/m initially. It is obvious that if a o  =1 and j o  =0, q 1  is greater than the upper boundary (3D n  /(2mD-3) obtained by substituting a=D-1 and j=m-1 in eq. (3.3)) of the ls-subdivision S.sub.(mD-1)/m. So another contraction mapping of h m  (q 1 ,(ma 1  +j 1 )/m) is required to obtain a smaller value. 
     First, we must determine the corresponding a 1  and j 1  for the value q 1  from following inequalities obtained from the ls-subdivision boundaries in eq. (3.3): (2m(D-a 1 )-2j 1  -1)D n  /(2ma 1  +2j 1  +1)&lt;D n  /(2ma o  +2j o  -1)≦(2m(D-a 1 )-2j 1  +1)D n  /(2ma 1  +2j 1  -1) 
     After a simple computation, we obtain 
     
         ma.sub.1 +j.sub.1 = ((2mD+1)(2ma.sub.o +2j.sub.o -1)+1)/(4ma.sub.o +4j.sub.o)                                                (3.7) 
    
     where  R  denotes an integer in the range R-1 &lt; R ≦R, and R is a real number. 
     Next, by using the value q 1  and by determining a 1  and j 1  from the inequalities, R-1&lt; R ≦R, the interval bound of q 2  is determined as follows: (1) When the inequality  R ≦R is used, the upper bound of the interval range is 
     
         q.sub.2 =h.sub.m (q.sub.1,(ma.sub.1 +j.sub.1)/m)≦(ma.sub.o +j.sub.o)D.sup.n /(2ma.sub.o +2j.sub.o -1)mD.             (3.8) 
    
     Since the last term of eq. (3.8) is positive, there is no need to have the difference term, (D n  +q 1 )/2mD, in h m  (q,a). Then, we compare the upper bound of q 2  with the upper bound of S.sub.(mD-1)/m : 
     
         3D.sup.n /(2mD-3)-(ma.sub.o +j.sub.o)D.sup.n /(2ma.sub.o +2j.sub.o -1)mD=((4(ma.sub.o +j.sub.o)-3)mD+3(ma.sub.o +j.sub.o))D.sup.n /(2mD-3)(2ma.sub.o +2j.sub.o -1)mD                        (3.9) 
    
     Eq. (3.9) results in a positive number, so q 2  must belong in S.sub.(mD-1)/m since 4(ma o  +j o )-3&gt;0, 2mD-3&gt;0, and (2ma o  +2j o  -1)&gt;0 by taking the smallest values of a o  =1, j o  =0, m=1, and D=2, and no further mapping is needed. (2) When the inequality R-1&lt; R  is used, the lower bound of the interval range is found as follows: ##EQU11## Eq. (3.10) results in a negative value when the smallest values of a o , j o , m and D are taken. Therefore, this negative value is replaced by (D n  +q 1 )/2mD=(ma o  +j o )D n  /(mD(2ma o  +2j o  -1)), which is the largest value in h m  (q o ,(ma o  +j o )/m), namely M 2m ,2j a  for m=2,4 and j=1,2 respectively, as shown in FIG. 1. It is sufficient to compare the largest value with the upper bound of S.sub.(mD-1)/m : ##EQU12## Eq. (3.11)is positive when the smallest values of a o , j o , m and D are taken. Thus, from these two cases we find the value of q 2  is in S.sub.(mD-1)/m or S D . Then, the final value of q f  is computed as follows: ##EQU13## 
     An example of the generalized process: Let A=1 be a dividend and B=54 a divisor in decimal. By taking the base radix D=8=10 8  and n=1, the value of P is found to be 56 8  as follows: B=D n  +P=54 10  66 8 . All computation in the example is carried out in octal with m=2 by using the s-subdivision shown in FIG. 2 a computed from eq. (3.3). 
     Step 1: Since B=10+56, q o  =56. From FIG. 2 and the value q o  /D n  =56/10 5.6, we find a o  =1 and j o  =0 in the s-subdivision. Set i=0 and α=1. 
     Step 2: Since q 0  is not in S.sub.(2D-1)/2 nor in S D , go to the next step. ##EQU14## Since q o  (=56) is less than the root, 7.0, of the s-subdivision as shown in FIG. 2 (q 1  -=g(q o ,(ma o  +j o )/m)&lt;0), the quantity (D n+i  +q i )/2mD is added to q 1 , namely the acceleration constant (2ma i  +2j i  +1)/2m is used in the q i+1  and α(=α(2ma o  +2j o  +1)/2m=1×(5/4)=5/4) computations. Increase the counter i by one, i=i+1=0+1=1. 
     Step 4: Now the value q 1  /D n  becomes q 1  /D n  =0.34/10=0.034. By searching the s-subdivisions in FIG. 2, we find that q 1  is in the s-subdivision with a 1  =D-1 and j 1  =1. Since the quantity q 1  is now in S.sub.(mD-1)/m, go to step 5. ##EQU15## Comparing the real quotient, 1/66 8  =0.0113664, with the approximate reciprocal, we find the results accurate up to 9 or 17 digits when the terms of the power series are evaluated up to q f   2  or q f   4 , respectively. 
     FIG. 1 illustrates the boundary of subdivisions S a+1   1  and S a   1  ; the intervals of s-subdivisions S a+1   2 , S.sub.(2a+1)/2 2 , and S a   2  ; and the intervals of 2s-subdivisions S a+1   4 , S.sub.(4a+3)/4 4 , S.sub.(4a+2)/4 4 , S.sub.(4a+1)/4 4 , and S a   4 . The difference terms, 1/(2ma+2j+1), in h m  (9,(ma +j)/m) are indicated by the brace with 1/(2a+1) at the lower boundary of subdivision S a   1  (when m=1 and j=0) and by the braces with 1/(4a+3) and 1/(4a+1) at the lower boundaries of s-subdivisions S.sub.(2a+1)/2 2  and S a   2  (when m=2 and j=1,0) respectively. Two dark solid lines, one dark dotted line and three dark chained lines represent the functions of g(q,(ma+j)/m) in (a) the cases m=1 and j=0,1 for the dark solid lines, in (b) the case m=2 and j=1 for the dark dotted line, and in (c) the cases m=4 and j 1,2,3 for the dark chained lines, respectively. 
     FIG. 2 is the table of the s-subdivision computed from eqs. (3.3) and the roots of g(q,(ma+j)/m)=0 in each s-subdivision. 
     FIG. 3 shows the successive multiplication of acceleration constants to dividend and divisor. When the control unit 1, comprising sequential circuitry, has received a division start signal after storing dividend A and divisor B into the dividend/quotient register 25 and the divisor register 2, respectively, the control unit resets the pseudoradix register 6 with a predetermined pseudoradix D n . Each of these three registers and the q register 7 is structured in a row of associated flipflops. Then the control unit commands the negatation logic 5 to get -D n  and starts the addition 3 to obtain q o . The resultant q o  is stored in the q register 7. Next, the control unit initiates the determination logic of a i  and j i , comprising combinational logic circuits and Read Only Memory (ROM) of a table, that provides a control signal, s(D-1&lt;a i ), s(D-1=a i , m-1=j i ) or s((D-1&gt;a i ) or (D-1=a i , m-1&gt;j i )) by comparing a i  and j i  with D-1 and m-1 respectively, and an acceleration constant ma i  +j i  and the root of g(q i , (ma i  +j.sub. i)/m)=0 as the output from the input q i . At the same time, the control unit starts the process of making the quantity D n  +q i  that reaches the multiplication 15 through the OR logic 12. Subsequently, the control unit regulates the following operations. 
     If a signal s((D-1&gt;a i ) or (D-1=a i ,m-1&gt;j i )) is generated, then the signal is used to open the paths of the AND logic gates 18 and 20 for the acceleration constant and for one, respectively. The constant passing the gate is sent to the shift and OR operation 14 to make the quantity (2ma i  +2j i  +1)/2 which is the modified acceleration constant in h m  (q i ,(ma i  +j i )/m). The comparison q i  -q r  until 11 generates the result whether the difference of q i  -q r  is positive or negative. If the negative value of the comparison occurs then the AND logic gate 13 is opened for the path of the modified acceleration constant, (2ma i  +2j i  +1)/2, to the multiplications 15 and 27. If the positive value results then the AND logic gate 16 is opened for the path of the acceleration constant, ma i  +j i , to the multiplications 15 and 27. After the multiplication 15 of the acceleration constant to D n  +q i  is completed, the sequential process, (1) (ma i  +j i )(D n  +q i )/m or (2ma i  +2j i  +1)(d n  +g i )/2m by the shift m bits operation 19, (2) -D n+1  +(ma i  +j i )(D n  +q i )/m or -D n+1  +(2ma i  +2j i  +1)(D n+q   i )/2m by the addition 21, and (3) q i+1  =(-D n+1  +(ma i  +j i ) (D n  +q i )/m)/D or (-D n+1  +(2ma i  +2j i  +1)(D n  +q i )/2m)/D by the digit shift 23, is initiated. Then, the quantity q i+1  is stored back in the q register 7. 
     The acceleration constant passed the AND logic gate 13 or 16 is used in the multiplication 27 to form the quantity (ma i  +j i )A&#39; or (2ma i  +2j i  +1)A&#39;/2 where A&#39; denotes the content of the dividend/quotient register 25. Then, the shift m bits operation 29 is performed to produce the next content of the dividend/quotient register. After the present content of the pseudoradix register 6 is sent to the multiplication 15 through the OR logic gate 12, the digit shift operation 4 is applied to the content of the register 6 to get the next iteration value in it. A process forming the new contents of the pseudoradix register 6, the q register 7, and the dividend/quotient register 25 described above is one iteration of the successive multiplication of acceleration constants. 
     If a signal s(D-1=a i , m-1=j i ) is generated by the determination logic of a i  and j i , the logical AND gates 8, 22, and 24 are opened for passing the quantities D n  +q i , n+1, and A&#39;, respectively. Then, the quantity D n  +q i  is used to make the quantity (mD-1)(D n  +q i ) by the digit shift 9 and the subtraction 10. This resultant becomes the value of q f  after the shift m bits operation 19, the addition 21 of -D n+1 , and the digit shift 23, namely q f  =(-D n+1  +(mD-1)(D n  +q i )/m)/D n+1 , which is stored back in the q register. Also the multiplication (mD-1)A&#39;/m is performed through the digit shift 26 producing mDA&#39;, the subtraction 28 making (mD-1)A&#39;, and the shift m bits operation 29 resulting (mD-1)A&#39;/m. The result is stored back in the dividend/quotient register. After the completion of the two multiplications of (mD-1)/m, namely after the delaying at the delay unit 30, the control signal s(D-1=a i , m-1=j i ) becomes the ending signal of the successive multiplication of acceleration constants. 
     When a signal s(D-1&lt;a i ) is generated by the determination logic of a i  and j i , the contents of the q register and of the dividend/quotient register become the results of the successive multiplication of acceleration constants. So the signal is the termination signal of the successive multiplication through the OR logic 31. Typical structures of the functions of the determination logic of a i  and j i , and of the evaluation process of the power series are similar to the ones described in the FIGS. 7 and 8 of the filed application Ser. No. 959,269, now U.S. Pat. No. 4,364,115. 
     While the above description contains many specificities, these should not be construed as limitations on the scope of the invention, but rather as an exemplification of one preferred embodiment thereof. Many other variations are possible, for example if a parallel process provides the remainder of A/B where A&gt;B, then this process is useful in integer number division. The parallel process is successive applications of Horner&#39;s scheme on the polynomial form (. . . (A m  P+A m-1 )P+. . . +A 1 )P+A o  where A i  for i=0,1,2, . . . ,m are digits of A=(. . . (A m  D&#39;+A m-1 )D&#39;+. . . A 1 )D&#39;+A o  and P=D&#39;-B, and the applications continue on the evaluated result of Horner&#39;s scheme again and again until the very last result becomes less than D&#39;. Suppose A=10000 8  in the example where P=12 8  and D&#39;=D 2  =100 8 . A computation is shown here. The first and second applications of Horner&#39; s scheme result in (1×P+00)×P+00=(1×12)×12=144 and 1×12+44=56. Then the last result 56 is less than 100 and is less than B=66. So the remainder is 56 8  =46 10 . When the last value is greater than B, the difference between the last value and the divisor (or a multiple of the divisor) becomes the remainder if P is less than B. If P is greater than B, a smaller P may be chosen by taking the difference between P and B. Accordingly, the scope of the invention should be determined not by the embodiment illustrated, but by the appended claims and their legal equivalents.