Lines Matching refs:len

32 		if (i < len) {  in setBlock()
38 if (i >= len) { in setBlock()
42 for (Index j = len; j < i; j++) in setBlock()
44 len = i+1; in setBlock()
57 Blk leftmostBlock = getBlock(len - 1); in bitLength()
63 return leftmostBlockLen + (len - 1) * N; in bitLength()
77 if (len < x.len) in compareTo()
79 else if (len > x.len) in compareTo()
83 Index i = len; in compareTo()
133 if (a.len == 0) { in add()
136 } else if (b.len == 0) { in add()
147 if (a.len >= b.len) { in add()
155 len = a2->len + 1; in add()
156 allocate(len); in add()
158 for (i = 0, carryIn = false; i < b2->len; i++) { in add()
174 for (; i < a2->len && carryIn; i++) { in add()
181 for (; i < a2->len; i++) in add()
187 len--; in add()
192 if (b.len == 0) { in subtract()
196 } else if (a.len < b.len) in subtract()
204 len = a.len; in subtract()
205 allocate(len); in subtract()
207 for (i = 0, borrowIn = false; i < b.len; i++) { in subtract()
222 for (; i < a.len && borrowIn; i++) { in subtract()
230 len = 0; in subtract()
234 for (; i < a.len; i++) in subtract()
301 BigUnsigned::Blk part2 = (x == num.len) ? 0 : (num.blk[x] << y); in getShiftedBlock()
308 if (a.len == 0 || b.len == 0) { in multiply()
309 len = 0; in multiply()
325 len = a.len + b.len; in multiply()
326 allocate(len); in multiply()
328 for (i = 0; i < len; i++) in multiply()
331 for (i = 0; i < a.len; i++) { in multiply()
349 for (j = 0, k = i, carryIn = false; j <= b.len; j++, k++) { in multiply()
372 if (blk[len - 1] == 0) in multiply()
373 len--; in multiply()
412 if (b.len == 0) { in divideWithRemainder()
413 q.len = 0; in divideWithRemainder()
421 if (len < b.len) { in divideWithRemainder()
422 q.len = 0; in divideWithRemainder()
464 Index origLen = len; // Save real length. in divideWithRemainder()
467 allocateAndCopy(len + 1); in divideWithRemainder()
468 len++; in divideWithRemainder()
472 Blk *subtractBuf = new Blk[len]; in divideWithRemainder()
475 q.len = origLen - b.len + 1; in divideWithRemainder()
476 q.allocate(q.len); in divideWithRemainder()
478 for (i = 0; i < q.len; i++) in divideWithRemainder()
482 i = q.len; in divideWithRemainder()
499 for (j = 0, k = i, borrowIn = false; j <= b.len; j++, k++) { in divideWithRemainder()
536 if (q.blk[q.len - 1] == 0) in divideWithRemainder()
537 q.len--; in divideWithRemainder()
552 len = (a.len >= b.len) ? b.len : a.len; in bitAnd()
553 allocate(len); in bitAnd()
555 for (i = 0; i < len; i++) in bitAnd()
564 if (a.len >= b.len) { in bitOr()
571 allocate(a2->len); in bitOr()
572 for (i = 0; i < b2->len; i++) in bitOr()
574 for (; i < a2->len; i++) in bitOr()
576 len = a2->len; in bitOr()
584 if (a.len >= b.len) { in bitXor()
591 allocate(a2->len); in bitXor()
592 for (i = 0; i < b2->len; i++) in bitXor()
594 for (; i < a2->len; i++) in bitXor()
596 len = a2->len; in bitXor()
613 len = a.len + shiftBlocks + 1; in bitShiftLeft()
614 allocate(len); in bitShiftLeft()
618 for (j = 0, i = shiftBlocks; j <= a.len; j++, i++) in bitShiftLeft()
621 if (blk[len - 1] == 0) in bitShiftLeft()
622 len--; in bitShiftLeft()
641 if (rightShiftBlocks >= a.len + 1) { in bitShiftRight()
644 len = 0; in bitShiftRight()
649 len = a.len + 1 - rightShiftBlocks; in bitShiftRight()
650 allocate(len); in bitShiftRight()
652 for (j = rightShiftBlocks, i = 0; j <= a.len; j++, i++) in bitShiftRight()
655 if (blk[len - 1] == 0) in bitShiftRight()
656 len--; in bitShiftRight()
665 for (i = 0; i < len && carry; i++) { in operator ++()
671 allocateAndCopy(len + 1); in operator ++()
672 len++; in operator ++()
684 if (len == 0) in operator --()
693 if (blk[len - 1] == 0) in operator --()
694 len--; in operator --()