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;
307 /// @returns the carry out of the multiplication.
312 uint64_t carry = 0;
319 // hasCarry - A flag to indicate if there is a carry to the next digit.
320 // hasCarry == 0, no carry
321 // hasCarry == 1, has carry
322 // hasCarry == 2, no carry and the calculation result == 0.
324 dest[i] = carry + lx * ly;
325 // Determine if the add above introduces carry.
326 hasCarry = (dest[i] < carry) ? 1 : 0;
327 carry = hx * ly + (dest[i] >> 32) + (hasCarry ? (1ULL << 32) : 0);
328 // The upper limit of carry can be (2^32 - 1)(2^32 - 1) +
330 hasCarry = (!carry && hasCarry) ? 1 : (!carry ? 2 : 0);
332 carry += (lx * hy) & 0xffffffffULL;
333 dest[i] = (carry << 32) | (dest[i] & 0xffffffffULL);
334 carry = (((!carry && hasCarry != 2) || hasCarry == 1) ? (1ULL << 32) : 0) +
335 (carry >> 32) + ((lx * hy) >> 32) + hx * hy;
337 return carry;
348 uint64_t carry = 0, lx = 0, hx = 0;
352 // hasCarry - A flag to indicate if has carry.
353 // hasCarry == 0, no carry
354 // hasCarry == 1, has carry
355 // hasCarry == 2, no carry and the calculation result == 0.
357 uint64_t resul = carry + lx * ly;
358 hasCarry = (resul < carry) ? 1 : 0;
359 carry = (hasCarry ? (1ULL << 32) : 0) + hx * ly + (resul >> 32);
360 hasCarry = (!carry && hasCarry) ? 1 : (!carry ? 2 : 0);
362 carry += (lx * hy) & 0xffffffffULL;
363 resul = (carry << 32) | (resul & 0xffffffffULL);
365 carry = (((!carry && hasCarry != 2) || hasCarry == 1) ? (1ULL << 32) : 0)+
366 (carry >> 32) + (dest[i+j] < resul ? 1 : 0) +
369 dest[i+xlen] = carry;
736 uint64_t Carry = 0;
739 Dst[I] = (Tmp >> Shift) | Carry;
740 Carry = Tmp << (64 - Shift);
1145 // If we are shifting less than a word, compute the shift with a simple carry
1209 uint64_t carry = 0;
1211 val[i] = pVal[i] << shiftAmt | carry;
1212 carry = pVal[i] >> (APINT_BITS_PER_WORD - shiftAmt);
1594 // A carry will occur to the left of u[j+n], and it should be ignored
1596 bool carry = false;
1599 u[j+i] += v[i] + carry;
1600 carry = u[j+i] < limit || (carry && u[j+i] == limit);
1602 u[j+n] += carry;
1623 unsigned carry = 0;
1626 r[i] = (u[i] >> shift) | carry;
1627 carry = u[i] << (32 - shift);
2449 /* DST += RHS + C where C is zero or one. Returns the carry flag. */
2474 /* DST -= RHS + C where C is zero or one. Returns the carry flag. */
2507 /* DST += SRC * MULTIPLIER + CARRY if add is true
2508 DST = SRC * MULTIPLIER + CARRY if add is false
2520 integerPart multiplier, integerPart carry,
2536 /* [ LOW, HIGH ] = MULTIPLIER * SRC[i] + DST[i] + CARRY.
2547 low = carry;
2567 /* Now add carry. */
2568 if (low + carry < low)
2570 low += carry;
2581 carry = high;
2587 dst[i] = carry;
2590 /* We overflowed if there is carry. */
2591 if (carry)
2841 /* Increment a bignum in-place, return the carry flag. */