Skip to content

Add division

A trivial implementation of the division algorithm has been added. The following scheme is implemented: A - dividend B - divisor Q - result

R' = 0 for i = N - 1 to 0 R = {R' << 1, A[i]} if D < 0 then Q[i] = 0, R' = R else Q[i] = 1, R' = D endfor R = R' // remainder from division, at this moment is not used

Merge request reports