FLINT3.7.0-dev

_nmod_poly_KS2_pack1, _nmod_poly_KS2_pack

Synopsis#include <flint/nmod_poly.h>
void _nmod_poly_KS2_pack1(nn_ptr res, nn_srcptr op, slong n, slong s, ulong b, ulong k, slong r)source
void _nmod_poly_KS2_pack(nn_ptr res, nn_srcptr op, slong n, slong s, ulong b, ulong k, slong r)source

Write k zero bits followed by the n values op[0], op[s], ..., op[(n-1) s] in fields of b bits to res, and zero-pad the output to r limbs if r \ne 0. Each value must be less than 2^b. The pack1 version requires b \le \mathtt{FLINT\_BITS}, the other b \le 3 \mathtt{FLINT\_BITS}. Used by _nmod_poly_mul_KS2 and _nmod_poly_mul_KS4.

Cite this page

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