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 fxnf x^n, respectively to ⌊f/xn⌋\lfloor f / x^n \rfloor (the coefficients of degree nn and higher, moved down). The underscore versions write len+n\mathit{len} + n respectively len−n\mathit{len} - n coefficients (n<lenn < \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-11-02).