_nmod_poly_evaluate_nmod_precomp, _nmod_poly_evaluate_nmod_precomp_lazy
#include <flint/nmod_poly.h>ulong _nmod_poly_evaluate_nmod_precomp(nn_srcptr poly, slong len, ulong c, ulong c_precomp, ulong modn)sourceulong _nmod_poly_evaluate_nmod_precomp_lazy(nn_srcptr poly, slong len, ulong c, ulong c_precomp, ulong modn)sourceEvaluate poly at c modulo modn by Horner's rule with Shoup multiplication, given c_precomp = n_mulmod_precomp_shoup(c, modn). Require c < \mathit{modn} < 2^{\mathtt{FLINT\_BITS} - 1}.
The lazy version does not reduce the additions: if all coefficients are less than m and m \le 2^{\mathtt{FLINT\_BITS}} - 2\,\mathit{modn} + 1, it returns a value in [0, m + 2\,\mathit{modn} - 1) congruent to the result. The coefficients need not be reduced. With reduced coefficients (m = \mathit{modn}) this requires 3\,\mathit{modn} - 1 \le 2^{\mathtt{FLINT\_BITS}}, and the result is reduced by subtracting \mathit{modn} or 2\,\mathit{modn}.
The FLINT team, “_nmod_poly_evaluate_nmod_precomp, _nmod_poly_evaluate_nmod_precomp_lazy (nmod_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/nmod_poly/_nmod_poly_evaluate_nmod_precomp.html (generated 2026-10-20).
@misc{flint-doc-nmod-poly-nmod-poly-evaluate-nmod-precomp,
author = {{The FLINT team}},
title = {{\_nmod\_poly\_evaluate\_nmod\_precomp, \_nmod\_poly\_evaluate\_nmod\_precomp\_lazy (nmod\_poly.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/nmod_poly/_nmod_poly_evaluate_nmod_precomp.html},
note = {Generated 2026-10-20}
}