FLINT3.7.0-dev

qqbar_is_root_of_unity

Synopsis#include <flint/qqbar.h>
int qqbar_is_root_of_unity(slong * p, ulong * q, const qqbar_t x)source

Returns whether x is a root of unity, that is, whether its minimal polynomial is cyclotomic. If so and if p and q are not NULL, sets them to the integers with 0≤p<q0 \le p < q and gcd⁡(p,q)=1\gcd(p, q) = 1 such that x=e2πip/qx = e^{2 \pi i p / q}.

Cite this page

The FLINT team, “qqbar_is_root_of_unity (qqbar.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/qqbar/qqbar_is_root_of_unity.html (generated 2026-11-02).