FLINT3.7.0-dev

_fmpz_mpoly_mul_johnson, _fmpz_mpoly_mul_johnson_maxfields

Synopsis#include <flint/fmpz_mpoly.h>
slong _fmpz_mpoly_mul_johnson(fmpz ** poly1, ulong ** exp1, slong * alloc, const fmpz * poly2, const ulong * exp2, slong len2, const fmpz * poly3, const ulong * exp3, slong len3, flint_bitcnt_t bits, slong N, const ulong * cmpmask)source
void _fmpz_mpoly_mul_johnson_maxfields(fmpz_mpoly_t A, const fmpz_mpoly_t B, fmpz * maxBfields, const fmpz_mpoly_t C, fmpz * maxCfields, const fmpz_mpoly_ctx_t ctx)source

The heap multiplication on raw term lists: multiply (poly2, exp2, len2) by (poly3, exp3, len3) (both nonzero, monomials of N words packed with bits bits, which must suffice for the product), writing the product to (*poly1, *exp1) with allocation *alloc, which are reallocated as needed, and return its length. The heap has at most len2 entries, so the shorter input should come first. No aliasing is allowed. The maxfields version takes precomputed field-wise maxima of the inputs (and clobbers maxBfields), chooses the packing width and handles aliasing.

Cite this page

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