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