FLINT3.7.0-dev

pack_exp2, pack_exp3, extract_exp

Synopsis#include <flint/mpoly.h>
ulong pack_exp2(ulong e0, ulong e1)source
ulong pack_exp3(ulong e0, ulong e1, ulong e2)source
ulong extract_exp(ulong e, int idx, int nvars)source

Pack two (three) small exponents into one word with fields of \text{FLINT\_BITS}/2 (\text{FLINT\_BITS}/3) bits, e0 in the most significant field, so that comparing the words compares the exponent tuples lexicographically. extract_exp returns the field of index idx (counted from the least significant) of a word packed with nvars equal fields. Used for the bivariate and trivariate base cases of the GCD and factoring code.

Cite this page

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