FLINT3.7.0-dev

fmpzi_canonical_unit_i_pow

Synopsis#include <flint/fmpzi.h>
slong fmpzi_canonical_unit_i_pow(const fmpzi_t x)source

Returns k \in \{0, 1, 2, 3\} such that i^k x is the canonical associate of x: the one with positive real part a and imaginary part b in (-a, a] (for x = 0, k = 0).

Cite this page

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