FLINT3.7.0-dev

_gr_poly_newton_basis_interpolate_exact, gr_poly_newton_basis_interpolate_exact, _gr_poly_newton_basis_interpolate, gr_poly_newton_basis_interpolate

Synopsis#include <flint/gr_poly.h>
int _gr_poly_newton_basis_interpolate_exact(gr_ptr res, gr_srcptr basis, gr_srcptr ys, slong len, gr_ctx_t ctx)source
int gr_poly_newton_basis_interpolate_exact(gr_poly_t res, const gr_vec_t basis, const gr_vec_t ys, gr_ctx_t ctx)source
int _gr_poly_newton_basis_interpolate(gr_ptr res, gr_srcptr basis, gr_srcptr ys, slong len, gr_ctx_t ctx)source
int gr_poly_newton_basis_interpolate(gr_poly_t res, const gr_vec_t basis, const gr_vec_t ys, gr_ctx_t ctx)source

Set res to the Newton basis form of the interpolating polynomial ff of length at most len with f(ci)=yif(c_i) = y_i for 0≤i<len0 \le i < \mathit{len}, computed by divided differences. The first len points of basis must be pairwise distinct.

The ring is presumed to be an integral domain, which is not checked; over other rings the functions may succeed without the result being an interpolating polynomial. They return GR_DOMAIN or GR_UNABLE if basis has fewer than len points (checked by the non-underscore versions only), if the points are not distinct, or if ff has coefficients in the fraction field of RR but not in RR. The exact versions assume distinct points and coefficients in RR, use exact divisions, and may return an arbitrary polynomial otherwise.

Cite this page

The FLINT team, “_gr_poly_newton_basis_interpolate_exact, gr_poly_newton_basis_interpolate_exact, _gr_poly_newton_basis_interpolate, gr_poly_newton_basis_interpolate (gr_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr_poly/_gr_poly_newton_basis_interpolate_exact.html (generated 2026-11-02).