Function scuttlebutt::field::fft::lagrange_interpolation_at_zero
source · [−]pub fn lagrange_interpolation_at_zero<Field>(
points: &[Field],
values: &[Field]
) -> Fieldwhere
Field: FiniteField,
Expand description
Performs a Lagrange interpolation at the origin for a polynomial defined by
points
and values
.
points
and values
are expected to be two arrays of the same size, containing
respectively the evaluation points (x) and the value of the polynomial at those point (p(x)).
The result is the value of the polynomial at x=0. It is also its zero-degree coefficient.
This is obviously less general than newton_interpolation_general
as we
only get a single value, but it is much faster.