_nmod_poly_compose_series, nmod_poly_compose_series
#include <flint/nmod_poly.h>void _nmod_poly_compose_series(nn_ptr res, nn_srcptr poly1, slong len1, nn_srcptr poly2, slong len2, slong n, nmod_t mod)sourcevoid nmod_poly_compose_series(nmod_poly_t res, const nmod_poly_t poly1, const nmod_poly_t poly2, slong n)sourceSet res to , where poly2 must have constant term 0 (the non-underscore version throws FLINT_ERROR otherwise). The underscore version requires , writes coefficients and does not allow aliasing.
The algorithm is chosen by _gr_poly_compose_series: Horner's rule for short inputs, a direct substitution for a monomial poly2, the divide-and-conquer algorithm when the composition is not much longer than , the Brent–Kung baby-step giant-step algorithm [BrentKung1978] for , and the algorithm of Kinoshita and Li [KL2024], with operations, from on.
References#
- [BrentKung1978] Brent, R. P. and Kung, H. T. : Fast Algorithms for Manipulating Formal Power Series, J. ACM 25:4 (1978) 581–595
- [KL2024] Y. Kinoshita and B. Li, "Power series composition in near-linear time", 2024, https://arxiv.org/abs/2404.05177
The FLINT team, “_nmod_poly_compose_series, nmod_poly_compose_series (nmod_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/nmod_poly/_nmod_poly_compose_series.html (generated 2026-11-02).
@misc{flint-doc-nmod-poly-nmod-poly-compose-series,
author = {{The FLINT team}},
title = {{\_nmod\_poly\_compose\_series, nmod\_poly\_compose\_series (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_compose_series.html},
note = {Generated 2026-11-02}
}