FLINT3.7.0-dev

_fmpz_promote, _fmpz_promote_val

Synopsis#include <flint/fmpz.h>
mpz_ptr _fmpz_promote(fmpz_t f)source
mpz_ptr _fmpz_promote_val(fmpz_t f)source

Ensure that f holds an mpz and return it. _fmpz_promote does not preserve the value of a small f (the mpz holds garbage); it is used before overwriting f. _fmpz_promote_val preserves the value. Either may leave f temporarily non-canonical.

Guides#

Cite this page

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