halo2_ecc::bigint::mul_no_carry

Function truncate

Source
pub fn truncate<F: ScalarField>(
    gate: &impl GateInstructions<F>,
    ctx: &mut Context<F>,
    a: OverflowInteger<F>,
    b: OverflowInteger<F>,
    num_limbs_log2_ceil: usize,
) -> OverflowInteger<F>
Expand description

ยงAssumptions

  • a and b have the same number of limbs k
  • k is nonzero
  • num_limbs_log2_ceil = log2_ceil(k)
  • log2_ceil(k) + a.max_limb_bits + b.max_limb_bits <= F::NUM_BITS as usize - 2