FLINT3.7.0-dev

_gr_poly_interpolation_weights, _gr_poly_interpolate_fast_precomp, _gr_poly_interpolate_fast, gr_poly_interpolate_fast

Synopsis#include <flint/gr_poly.h>
int _gr_poly_interpolation_weights(gr_ptr w, const gr_ptr * tree, slong len, gr_ctx_t ctx)source
int _gr_poly_interpolate_fast_precomp(gr_ptr poly, gr_srcptr ys, const gr_ptr * tree, gr_srcptr weights, slong len, gr_ctx_t ctx)source
int _gr_poly_interpolate_fast(gr_ptr res, gr_srcptr xs, gr_srcptr ys, slong len, gr_ctx_t ctx)source
int gr_poly_interpolate_fast(gr_poly_t poly, const gr_vec_t xs, const gr_vec_t ys, gr_ctx_t ctx)source

Fast interpolation with a subproduct tree. The weights are w_i = 1 / \prod_{j \ne i} (x_i - x_j), obtained by evaluating the derivative of the root product at the points; the precomp version takes the tree from _gr_poly_tree_build and the weights from _gr_poly_interpolation_weights. This requires a field (the weights must be invertible).

Cite this page

The FLINT team, “_gr_poly_interpolation_weights, _gr_poly_interpolate_fast_precomp, _gr_poly_interpolate_fast, gr_poly_interpolate_fast (gr_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr_poly/_gr_poly_interpolation_weights.html (generated 2026-10-20).