FLINT3.7.0-dev

fmpz_get_si, fmpz_get_ui

Synopsis#include <flint/fmpz.h>
slong fmpz_get_si(const fmpz_t f)source
ulong fmpz_get_ui(const fmpz_t f)source

Return f as an slong, respectively an ulong. The result is unspecified if f does not fit (use fmpz_fits_si and fmpz_abs_fits_ui to check); currently fmpz_get_ui returns the low limb of |f|, so a negative f is not reduced modulo 2^{\mathtt{FLINT\_BITS}}.

Guides#

Cite this page

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