halo2_base::utils

Function compose

Source
pub fn compose(input: Vec<BigUint>, bit_len: usize) -> BigUint
Expand description

Computes the value of an integer by passing as input a Vec of its limb values and the bit_len (bit length) used.

Returns the sum of all limbs scaled by 2(bit_len * i) where i is the index of the limb.

  • input: Limb values of the integer.
  • bit_len: Length of limb in bits