Skip to main content

reduce_packed_shifted

Function reduce_packed_shifted 

Source
pub fn reduce_packed_shifted<SF: PrimeField32, TF: PrimeField>(
    vals: &[SF],
    radix_bits: u32,
) -> TF
Expand description

Horner-evaluate vals as base-$2^{radix_bits}$ digits into TF, shifting each digit by +1.

This reserves zero as an out-of-band “no digit” value, so sequences of different lengths remain distinct when packed into a fixed-width slot.