Re: Assembly Language - Mathematics WITHOUT maths coprocessor
- From: "Richard Cooper" <spamandviruses@xxxxxx>
- Date: Sun, 09 Oct 2005 08:13:42 GMT
On Sun, 09 Oct 2005 02:21:43 -0400, ¬a\/b <al@xxx> wrote:
14.20 Algorithm Multiple-precision division INPUT: positive integers x = (xn, ... x1,x0)b, y = (yt,... y1,y0)b with n >= t >= 1, yt != 0. OUTPUT: the quotient q = (qn-t, ... q1,q0)b and remainder r = (rt,... r1r0)b such that x = qy + r, 0 <= r < y. 1. For j from 0 to (n - t) do: qj 0. 2. While (x ybn-t) do the following: qn-t qn-t + 1, x x - ybn-t. 3. For i from n down to (t + 1) do the following:
3.1 If xi = yt then set qi-t-1 b - 1; otherwise set qi-t-1 b(xib + xi-1)=yt)c.
####################### 3.2 While (q[i-t-1](y_tb +y_t-1) > x_ib^2 +x_i-1b + x_i-2) do: q[i-t-1]= q[i-t-1] -1. #######################
3.3 x = x - q[i-t-1]yb^(i-t-1).
####################### 3.4 If x < 0 then set x=x + yb^(i-t-1) and q[i-t-1]= q[i-t-1] - 1. ####################### 4. r x. 5. Return(q,r).
And that's why I don't like those cryptography people. They encrypt everything they write.
.
- Follow-Ups:
- References:
- Re: Assembly Language - Mathematics WITHOUT maths coprocessor
- From: Richard Cooper
- Re: Assembly Language - Mathematics WITHOUT maths coprocessor
- From: ¬a\\/b
- Re: Assembly Language - Mathematics WITHOUT maths coprocessor
- From: Richard Cooper
- Re: Assembly Language - Mathematics WITHOUT maths coprocessor
- From: ¬a\\/b
- Re: Assembly Language - Mathematics WITHOUT maths coprocessor
- From: Richard Cooper
- Re: Assembly Language - Mathematics WITHOUT maths coprocessor
- From: ¬a\\/b
- Re: Assembly Language - Mathematics WITHOUT maths coprocessor
- Prev by Date: Re: Assembly Language - Mathematics WITHOUT maths coprocessor
- Next by Date: Re: Assembly Language - Mathematics WITHOUT maths coprocessor
- Previous by thread: Re: Assembly Language - Mathematics WITHOUT maths coprocessor
- Next by thread: Re: Assembly Language - Mathematics WITHOUT maths coprocessor
- Index(es):