FLINT3.7.0-dev

qqbar_cmp_root_order

Synopsis#include <flint/qqbar.h>
int qqbar_cmp_root_order(const qqbar_t x, const qqbar_t y)source

Compares x and y in the order used to sort roots of polynomials, returning -1, 0 or 1: real numbers come first, in decreasing order; nonreal numbers follow, by decreasing real part, then by increasing absolute value of the imaginary part, then with positive imaginary part first. Complex conjugates are therefore adjacent, the one in the upper half-plane first.

Cite this page

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