Lines Matching +full:2 +full:- +full:point
4 | The entry point sMOD computes the floating point MOD of the
5 | input values X and Y. The entry point sREM computes the floating
6 | point (IEEE) REM of the input values X and Y.
9 | -----
10 | Double-extended value Y is pointed to by address in register
11 | A0. Double-extended value X is located in -12(A0). The values
17 | ------
18 | FREM(X,Y) or FMOD(X,Y), depending on entry point.
21 | ---------
28 | Step 2. Set L := expo(X)-expo(Y), k := 0, Q := 0.
32 | R := 2^(-L)X, j := L.
37 | 3.2 If R > Y, then { R := R - Y, Q := Q + 1}
39 | 3.4 k := k + 1, j := j - 1, Q := 2Q, R := 2R. Go to
42 | Step 4. At this point, R = X - QY = MOD(X,Y). Set
47 | 5.1 If R < Y/2, then R = MOD(X,Y) = REM(X,Y). Go to
49 | 5.2 If R > Y/2, then { set Last_Subtract := true,
51 | 5.3 This is the tricky case of R = Y/2. If Q is odd,
52 | then { Q := Q + 1, signX := -signX }.
56 | Step 7. If Last_Subtract = true, R := R - Y.
60 | Step 9. At this point, R = 2^(-j)*X - Q Y = Y. Thus,
61 | X = 2^(j)*(Q+1)Y. set Q := 2^(j)*(Q+1),
72 SREM_MOD: |idnt 2,1 | Motorola 040 Floating Point Software Package
110 moveml %d2-%d7,-(%a7) | ...save data registers
156 movew -12(%a0),%d0
163 movel -8(%a0),%d1
164 movel -4(%a0),%d2 | ...(D0,D1,D2) is |X|
204 subl %d3,%d0 | ...L := expo(X)-expo(Y)
206 clrl %d6 | ...D6 := carry <- 0
219 |..At this point R = 2^(-L)X; Q = 0; k = 0; and k+j = L
226 |..At this point carry = 0, R = (D1,D2), Y = (D4,D5)
232 |..At this point, R = Y
240 |..If Carry is set, then Y < (Carry,D1,D2) < 2Y. Otherwise, Carry = 0
241 |..and Y < (D1,D2) < 2Y. Either way, perform R - Y
242 subl %d5,%d2 | ...lo(R) - lo(Y)
243 subxl %d4,%d1 | ...hi(R) - hi(Y)
248 |..At this point, Carry=0, R < Y. R = 2^(k-L)X - QY; k+j = L; j >= 0.
252 addl %d3,%d3 | ...Q := 2Q
253 addl %d2,%d2 | ...lo(R) = 2lo(R)
254 roxll #1,%d1 | ...hi(R) = 2hi(R) + carry
255 scs %d6 | ...set Carry if 2(R) overflows
257 subql #1,%d0 | ...j := j - 1
258 |..At this point, R=(Carry,D1,D2) = 2^(k-L)X - QY, j+k=L, j >= 0, R < 2Y.
263 |..k = L, j = 0, Carry = 0, R = (D1,D2) = X - QY, R < Y.
300 clrw R+2(%a6)
305 clrw Y+2(%a6)
316 clrw R+2(%a6)
334 subql #1,%d6 | ...biased expo(Y/2)
378 moveml (%a7)+,%d2-%d7
391 |..R = 2^(-j)X - Q Y = Y, thus R = 0 and quotient = 2^j (Q+1)
414 |..Q is odd, Q := Q + 1, signX := -signX