_fmpz_poly_interpolate, fmpz_poly_interpolate, _fmpz_poly_interpolate_newton, fmpz_poly_interpolate_newton, _fmpz_poly_interpolate_multi_mod, fmpz_poly_interpolate_multi_mod
#include <flint/fmpz_poly.h>int fmpz_poly_interpolate(fmpz_poly_t poly, const fmpz * xs, const fmpz * ys, slong n)sourceint fmpz_poly_interpolate_newton(fmpz_poly_t poly, const fmpz * xs, const fmpz * ys, slong n)sourceint fmpz_poly_interpolate_multi_mod(fmpz_poly_t poly, const fmpz * xs, const fmpz * ys, slong n)sourceSet poly to the polynomial f of degree less than n with f(x_i) = y_i for 0 \le i < n and return 1, if the x_i are distinct and f has integer coefficients; otherwise return 0. The newton version computes divided differences, failing at the first inexact division, and converts from the Newton basis; the multi_mod version interpolates modulo word-size primes (with a fast algorithm for many points) and combines the results by the Chinese remainder theorem until they stabilise and are checked. The default uses Newton interpolation for n \le 25 and chooses by size otherwise. The underscore versions write n coefficients.
The FLINT team, “_fmpz_poly_interpolate, fmpz_poly_interpolate, _fmpz_poly_interpolate_newton, fmpz_poly_interpolate_newton, _fmpz_poly_interpolate_multi_mod, fmpz_poly_interpolate_multi_mod (fmpz_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpz_poly/_fmpz_poly_interpolate.html (generated 2026-10-20).
@misc{flint-doc-fmpz-poly-fmpz-poly-interpolate,
author = {{The FLINT team}},
title = {{\_fmpz\_poly\_interpolate, fmpz\_poly\_interpolate, \_fmpz\_poly\_interpolate\_newton, fmpz\_poly\_interpolate\_newton, \_fmpz\_poly\_interpolate\_multi\_mod, fmpz\_poly\_interpolate\_multi\_mod (fmpz\_poly.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/fmpz_poly/_fmpz_poly_interpolate.html},
note = {Generated 2026-10-20}
}