_gr_poly_interpolate, gr_poly_interpolate, _gr_poly_interpolate_exact, gr_poly_interpolate_exact, _gr_poly_interpolate_newton, gr_poly_interpolate_newton, _gr_poly_interpolate_exact_newton, gr_poly_interpolate_exact_newton
#include <flint/gr_poly.h>int _gr_poly_interpolate_exact(gr_ptr res, gr_srcptr xs, gr_srcptr ys, slong len, gr_ctx_t ctx)sourceint gr_poly_interpolate_exact(gr_poly_t poly, const gr_vec_t xs, const gr_vec_t ys, gr_ctx_t ctx)sourceint _gr_poly_interpolate_newton(gr_ptr res, gr_srcptr xs, gr_srcptr ys, slong len, gr_ctx_t ctx)sourceint gr_poly_interpolate_newton(gr_poly_t poly, const gr_vec_t xs, const gr_vec_t ys, gr_ctx_t ctx)sourceint _gr_poly_interpolate_exact_newton(gr_ptr res, gr_srcptr xs, gr_srcptr ys, slong len, gr_ctx_t ctx)sourceint gr_poly_interpolate_exact_newton(gr_poly_t poly, const gr_vec_t xs, const gr_vec_t ys, gr_ctx_t ctx)sourceSet res to the interpolating polynomial of length at most len with , for pairwise distinct points . The default versions currently call the newton versions, which compute divided differences in the Newton basis and convert to the monomial basis, with operations.
The ring is presumed to be an integral domain; over other rings the functions may succeed without the result interpolating. They return GR_DOMAIN or GR_UNABLE if xs and ys have different lengths (checked by the non-underscore versions only), if the points are not distinct, or if has coefficients in the fraction field of but not in (as for the points and values over ). The exact versions assume that the points are distinct and that has coefficients in , use exact divisions, and may return an arbitrary polynomial otherwise.
The FLINT team, “_gr_poly_interpolate, gr_poly_interpolate, _gr_poly_interpolate_exact, gr_poly_interpolate_exact, _gr_poly_interpolate_newton, gr_poly_interpolate_newton, _gr_poly_interpolate_exact_newton, gr_poly_interpolate_exact_newton (gr_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr_poly/_gr_poly_interpolate.html (generated 2026-11-02).
@misc{flint-doc-gr-poly-gr-poly-interpolate,
author = {{The FLINT team}},
title = {{\_gr\_poly\_interpolate, gr\_poly\_interpolate, \_gr\_poly\_interpolate\_exact, gr\_poly\_interpolate\_exact, \_gr\_poly\_interpolate\_newton, gr\_poly\_interpolate\_newton, \_gr\_poly\_interpolate\_exact\_newton, gr\_poly\_interpolate\_exact\_newton (gr\_poly.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/gr_poly/_gr_poly_interpolate.html},
note = {Generated 2026-11-02}
}