Lines Matching refs:op2
1217 op2 = _WorkRep(other)
1218 op1, op2 = _normalize(op1, op2, context.prec)
1221 if op1.sign != op2.sign:
1223 if op1.int == op2.int:
1227 if op1.int < op2.int:
1228 op1, op2 = op2, op1
1229 # OK, now abs(op1) > abs(op2)
1232 op1.sign, op2.sign = op2.sign, op1.sign
1238 op1.sign, op2.sign = (0, 0)
1241 # Now, op1 > abs(op2) > 0
1243 if op2.sign == 0:
1244 result.int = op1.int + op2.int
1246 result.int = op1.int - op2.int
1326 op2 = _WorkRep(other)
1328 ans = _dec_from_triple(resultsign, str(op1.int * op2.int), resultexp)
1374 op2 = _WorkRep(other)
1376 coeff, remainder = divmod(op1.int * 10**shift, op2.int)
1378 coeff, remainder = divmod(op1.int, op2.int * 10**-shift)
1411 op2 = _WorkRep(other)
1412 if op1.exp >= op2.exp:
1413 op1.int *= 10**(op1.exp - op2.exp)
1415 op2.int *= 10**(op2.exp - op1.exp)
1416 q, r = divmod(op1.int, op2.int)
1560 op2 = _WorkRep(other)
1561 if op1.exp >= op2.exp:
1562 op1.int *= 10**(op1.exp - op2.exp)
1564 op2.int *= 10**(op2.exp - op1.exp)
1565 q, r = divmod(op1.int, op2.int)
1566 # remainder is r*10**ideal_exponent; other is +/-op2.int *
1569 if 2*r + (q&1) > op2.int:
1570 r -= op2.int
5654 def _normalize(op1, op2, prec = 0):
5655 """Normalizes op1, op2 to have the same exp and length of coefficient.
5659 if op1.exp < op2.exp:
5660 tmp = op2
5664 other = op2
5680 return op1, op2