FLINT3.7.0-dev

_nmod_poly_evaluate_nmod, nmod_poly_evaluate_nmod

Synopsis#include <flint/nmod_poly.h>
ulong _nmod_poly_evaluate_nmod(nn_srcptr poly, slong len, ulong c, nmod_t mod)source
ulong nmod_poly_evaluate_nmod(const nmod_poly_t poly, ulong c)source

Return \mathit{poly}(c) for reduced c. Any length, including 0, is allowed.

For moduli below 2^{\mathtt{FLINT\_BITS} - 1}, lengths below FLINT_MULMOD_SHOUP_THRESHOLD (23 on common platforms) use Horner's rule with nmod_mul, lengths up to 50 Horner's rule with Shoup multiplication by the fixed c (with lazy reduction if 3n - 1 \le 2^{\mathtt{FLINT\_BITS}}), and longer polynomials rectangular splitting. For larger moduli, Horner's rule is used up to length 13 and rectangular splitting beyond.

Guides#

Cite this page

The FLINT team, “_nmod_poly_evaluate_nmod, nmod_poly_evaluate_nmod (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.html (generated 2026-10-20).