Division algorithm: Difference between revisions

Content deleted Content added
HenkeB (talk | contribs)
Restoring division: A readable version of the restoring division algorithm
HenkeB (talk | contribs)
Line 8:
==Slow division methods==
Slow division methods are all based on a standard recurrence equation:
:''P<mathsub>P_{j+1}</sub> = RP_{R×P<sub>j}</sub> - q_{q<sub>n-(j+1)}D</mathsub>×D''
where:
* ''P<mathsub>P_{j}</mathsub>'' = the partial remainder of the division
* ''R'' = the [[radix]]
* ''q<mathsub>q_{n-(j+1)}</mathsub>'' = the digit of the quotient in position <math>''n-(j+1)</math>'', where the digit positions are numbered from least-significant <math>0</math> to most significant <math>''n-1</math>''
* ''n'' = number of digits in the quotient
* ''D'' = the denominator
Line 18:
===Restoring division===
Restoring division operates on [[fixed-point]] fractional numbers and depends on the following assumptions:
* ''N < D''
* ''1/2 < N,D < 1''
 
The quotient digits ''q'' are formed from the digit set {0,1}.