_gr_poly_evaluate_horner, gr_poly_evaluate_horner, _gr_poly_evaluate_rectangular, gr_poly_evaluate_rectangular, _gr_poly_evaluate_modular, gr_poly_evaluate_modular
#include <flint/gr_poly.h>int _gr_poly_evaluate_horner(gr_ptr res, gr_srcptr poly, slong len, gr_srcptr x, gr_ctx_t ctx)sourceint _gr_poly_evaluate_rectangular(gr_ptr res, gr_srcptr poly, slong len, gr_srcptr x, gr_ctx_t ctx)sourceint _gr_poly_evaluate_modular(gr_ptr res, gr_srcptr poly, slong len, gr_srcptr x, gr_ctx_t ctx)sourceSet res to with a specific algorithm. Horner's rule uses multiplications by . The rectangular version (rectangular splitting, [PS1973]) computes for , evaluates the blocks of coefficients as dot products with these powers and combines the blocks by Horner's rule in , so that only multiplications are full products of ring elements; this pays off when the coefficients are cheaper than (small integers and a large , scalars and a matrix or polynomial argument). The modular version also computes the powers with and evaluates everything with dot products, which suits rings where dot products are much cheaper than separate multiplications (delayed modular reduction).
References#
- [PS1973] M. S. Paterson and L. J. Stockmeyer, "On the number of nonscalar multiplications necessary to evaluate polynomials", SIAM J. Comput (1973)
The FLINT team, “_gr_poly_evaluate_horner, gr_poly_evaluate_horner, _gr_poly_evaluate_rectangular, gr_poly_evaluate_rectangular, _gr_poly_evaluate_modular, gr_poly_evaluate_modular (gr_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr_poly/_gr_poly_evaluate_horner.html (generated 2026-11-02).
@misc{flint-doc-gr-poly-gr-poly-evaluate-horner,
author = {{The FLINT team}},
title = {{\_gr\_poly\_evaluate\_horner, gr\_poly\_evaluate\_horner, \_gr\_poly\_evaluate\_rectangular, gr\_poly\_evaluate\_rectangular, \_gr\_poly\_evaluate\_modular, gr\_poly\_evaluate\_modular (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_evaluate_horner.html},
note = {Generated 2026-11-02}
}