FLINT3.7.0-dev

_gr_poly_shift_left, gr_poly_shift_left, _gr_poly_shift_right, gr_poly_shift_right

Synopsis#include <flint/gr_poly.h>
int _gr_poly_shift_left(gr_ptr res, gr_srcptr poly, slong len, slong n, gr_ctx_t ctx)source
int gr_poly_shift_left(gr_poly_t res, const gr_poly_t poly, slong n, gr_ctx_t ctx)source
int _gr_poly_shift_right(gr_ptr res, gr_srcptr poly, slong len, slong n, gr_ctx_t ctx)source
int gr_poly_shift_right(gr_poly_t res, const gr_poly_t poly, slong n, gr_ctx_t ctx)source

Set res to f x^n, respectively to \lfloor f / x^n \rfloor (the coefficients of degree n and higher, moved down). The underscore versions write \mathit{len} + n respectively \mathit{len} - n coefficients (n < \mathit{len} for the right shift) and allow aliasing.

Cite this page

The FLINT team, “_gr_poly_shift_left, gr_poly_shift_left, _gr_poly_shift_right, gr_poly_shift_right (gr_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr_poly/_gr_poly_shift_left.html (generated 2026-10-20).