FLINT3.7.0-dev

fmpz_factor_expand, fmpz_factor_expand_multiexp, fmpz_factor_expand_iterative

Synopsis#include <flint/fmpz_factor.h>
void fmpz_factor_expand(fmpz_t n, const fmpz_factor_t factor)source
void fmpz_factor_expand_multiexp(fmpz_t n, const fmpz_factor_t factor)source
void fmpz_factor_expand_iterative(fmpz_t n, const fmpz_factor_t factor)source

Set n to the integer represented by factor, including the sign. fmpz_factor_expand calls fmpz_factor_expand_multiexp, which processes the bits of all exponents simultaneously, from the top: at each step it squares the result and multiplies it by the product of the bases whose exponent has that bit set. This is much faster than fmpz_factor_expand_iterative, which raises each base to its power and multiplies the powers one at a time.

Cite this page

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