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)sourcevoid fmpz_factor_expand_multiexp(fmpz_t n, const fmpz_factor_t factor)sourcevoid fmpz_factor_expand_iterative(fmpz_t n, const fmpz_factor_t factor)sourceSet 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).
@misc{flint-doc-fmpz-factor-fmpz-factor-expand,
author = {{The FLINT team}},
title = {{fmpz\_factor\_expand, fmpz\_factor\_expand\_multiexp, fmpz\_factor\_expand\_iterative (fmpz\_factor.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/fmpz_factor/fmpz_factor_expand.html},
note = {Generated 2026-10-20}
}