twenty_first::math::ntt

Function intt

Source
pub fn intt<FF>(x: &mut [FF])
Expand description

§Perform INTT on slices of prime-field elements

INTT is the inverse NTT, so abstractly, intt(values) = ntt(values) / n.

This transform is performed in-place.

§Example

let original_values = bfe_vec![0, 1, 1, 2, 3, 5, 8, 13];
let mut transformed_values = original_values.clone();
ntt(&mut transformed_values);
intt(&mut transformed_values);
assert_eq!(original_values, transformed_values);

§Panics

Panics if the length of the input slice is

  • not a power of two
  • larger than u32::MAX