Lines Matching refs:carry
413 /// Multiply two small integers (with carry) (and return the overflow contribution).
417 pub fn scalar_mul(x: Limb, y: Limb, carry: Limb) -> (Limb, Limb) {
421 let z: Wide = (x as Wide) * (y as Wide) + (carry as Wide);
432 let mut carry = y;
433 while carry != 0 && index < x.len() {
434 let result = scalar_add(x[index], carry);
436 carry = result.1 as Limb;
440 if carry != 0 {
441 x.try_push(carry)?;
455 let mut carry = 0;
457 let result = scalar_mul(*xi, y, carry);
459 carry = result.1;
462 if carry != 0 {
463 x.try_push(carry)?;
483 let mut carry = false;
489 // Limb::max_value() + Limb::max_value(). Add the previous carry,
490 // and store the current carry for the next.
494 if carry {
499 carry = tmp;
503 if carry {
638 // Always push the carry, even if it creates a non-normal result.
639 let carry = prev >> rshift;
640 if carry != 0 {
641 x.try_push(carry)?;