FLINT3.7.0-dev

fmpz_poly_attach_truncate, fmpz_poly_attach_shift

Synopsis#include <flint/fmpz_poly.h>
void fmpz_poly_attach_truncate(fmpz_poly_t trunc, const fmpz_poly_t poly, slong n)source
void fmpz_poly_attach_shift(fmpz_poly_t trunc, const fmpz_poly_t poly, slong n)source

Make the uninitialised trunc a read-only view of part of poly without copying: fmpz_poly_attach_truncate of the low \min(n, \operatorname{len}) coefficients, fmpz_poly_attach_shift of the coefficients from index n on, that is of \lfloor \mathit{poly} / x^n \rfloor (zero if n \ge \operatorname{len}). The view shares memory with poly; it must not be cleared, modified or used as an output, and becomes invalid when poly changes. A truncated view may have a zero leading coefficient, so it is not necessarily normalised.

Cite this page

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