Home | History | Annotate | Download | only in Support

Lines Matching defs:Carry

182 /// 1 is returned if there is a carry out, otherwise 0 is returned.
183 /// @returns the carry of the addition.
188 y = 1; // Carry one to next digit.
190 y = 0; // No need to carry so exit early
237 /// @returns the carry out from the addition
241 bool carry = false;
244 dest[i] = x[i] + y[i] + carry;
245 carry = dest[i] < limit || (carry && dest[i] == limit);
247 return carry;
291 /// @returns the carry out of the multiplication.
296 uint64_t carry = 0;
303 // hasCarry - A flag to indicate if there is a carry to the next digit.
304 // hasCarry == 0, no carry
305 // hasCarry == 1, has carry
306 // hasCarry == 2, no carry and the calculation result == 0.
308 dest[i] = carry + lx * ly;
309 // Determine if the add above introduces carry.
310 hasCarry = (dest[i] < carry) ? 1 : 0;
311 carry = hx * ly + (dest[i] >> 32) + (hasCarry ? (1ULL << 32) : 0);
312 // The upper limit of carry can be (2^32 - 1)(2^32 - 1) +
314 hasCarry = (!carry && hasCarry) ? 1 : (!carry ? 2 : 0);
316 carry += (lx * hy) & 0xffffffffULL;
317 dest[i] = (carry << 32) | (dest[i] & 0xffffffffULL);
318 carry = (((!carry && hasCarry != 2) || hasCarry == 1) ? (1ULL << 32) : 0) +
319 (carry >> 32) + ((lx * hy) >> 32) + hx * hy;
321 return carry;
332 uint64_t carry = 0, lx = 0, hx = 0;
336 // hasCarry - A flag to indicate if has carry.
337 // hasCarry == 0, no carry
338 // hasCarry == 1, has carry
339 // hasCarry == 2, no carry and the calculation result == 0.
341 uint64_t resul = carry + lx * ly;
342 hasCarry = (resul < carry) ? 1 : 0;
343 carry = (hasCarry ? (1ULL << 32) : 0) + hx * ly + (resul >> 32);
344 hasCarry = (!carry && hasCarry) ? 1 : (!carry ? 2 : 0);
346 carry += (lx * hy) & 0xffffffffULL;
347 resul = (carry << 32) | (resul & 0xffffffffULL);
349 carry = (((!carry && hasCarry != 2) || hasCarry == 1) ? (1ULL << 32) : 0)+
350 (carry >> 32) + (dest[i+j] < resul ? 1 : 0) +
353 dest[i+xlen] = carry;
758 uint64_t Carry = 0;
761 Dst[I] = (Tmp >> Shift) | Carry;
762 Carry = Tmp << (64 - Shift);
1171 // If we are shifting less than a word, compute the shift with a simple carry
1235 uint64_t carry = 0;
1237 val[i] = pVal[i] << shiftAmt | carry;
1238 carry = pVal[i] >> (APINT_BITS_PER_WORD - shiftAmt);
1620 // A carry will occur to the left of u[j+n], and it should be ignored
1622 bool carry = false;
1625 u[j+i] += v[i] + carry;
1626 carry = u[j+i] < limit || (carry && u[j+i] == limit);
1628 u[j+n] += carry;
1649 unsigned carry = 0;
1652 r[i] = (u[i] >> shift) | carry;
1653 carry = u[i] << (32 - shift);
2475 /* DST += RHS + C where C is zero or one. Returns the carry flag. */
2500 /* DST -= RHS + C where C is zero or one. Returns the carry flag. */
2533 /* DST += SRC * MULTIPLIER + CARRY if add is true
2534 DST = SRC * MULTIPLIER + CARRY if add is false
2546 integerPart multiplier, integerPart carry,
2562 /* [ LOW, HIGH ] = MULTIPLIER * SRC[i] + DST[i] + CARRY.
2573 low = carry;
2593 /* Now add carry. */
2594 if (low + carry < low)
2596 low += carry;
2607 carry = high;
2613 dst[i] = carry;
2616 /* We overflowed if there is carry. */
2617 if (carry)
2867 /* Increment a bignum in-place, return the carry flag. */