FLINT3.7.0-dev

fmpz_factor_struct, fmpz_factor_t

Synopsis#include <flint/fmpz_factor.h>
fmpz_factor_struct
fmpz_factor_t

An integer in factored form n = s \prod_{i} p_i^{e_i}. The fields are sign (-1, 0 or 1), p (an array of fmpz bases), exp (an array of ulong exponents), num (the number of factors) and alloc (the allocated length of the arrays). Zero is represented by sign 0 and no factors, \pm 1 by sign \pm 1 and no factors.

The factorisation functions produce distinct primes with positive exponents, but not sorted in any particular order: small primes found by trial division come first in increasing order, followed by the larger factors in the order in which they were split off.

Cite this page

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