FLINT3.7.0-dev

_nmod_poly_reverse, nmod_poly_reverse

Synopsis#include <flint/nmod_poly.h>
void _nmod_poly_reverse(nn_ptr output, nn_srcptr input, slong len, slong m)source
void nmod_poly_reverse(nmod_poly_t output, const nmod_poly_t input, slong m)source

Set output to the reversal x^{m-1} f(1/x) of the input f viewed as a polynomial of length m \ge 0: coefficient i of the output is coefficient m - 1 - i of the input, taken as 0 beyond its length. Input coefficients from index m on are ignored.

_nmod_poly_reverse writes exactly m coefficients, including leading zeros; nmod_poly_reverse normalises the result. The underscore version allows output == input but no partial overlap. Reversal turns division with remainder into power series division, which is why the _preinv functions of this module take the inverse of the reversed divisor; see Computing modulo a fixed polynomial.

Guides#

Cite this page

The FLINT team, “_nmod_poly_reverse, nmod_poly_reverse (nmod_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/nmod_poly/_nmod_poly_reverse.html (generated 2026-10-20).