FLINT3.7.0-dev

calcium_fmpz_hash

Synopsis#include <flint/calcium.h>
ulong calcium_fmpz_hash(const fmpz_t x)source

Returns a hash value for the integer x, used for hashing representations of exact numbers. The current algorithm, which may change, returns the value of a small x, and the least significant limb of a large x negated if x is negative (modulo 2^{\mathtt{FLINT\_BITS}}). Equal integers have equal hashes.

Cite this page

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