fmpq_poly_discriminant
Synopsis
#include <flint/fmpq_poly.h>void fmpq_poly_discriminant(fmpq_t res, const fmpq_poly_t poly)sourceSet res to the discriminant of poly, normalised so that \operatorname{disc}(f) = (-1)^{n(n-1)/2} \operatorname{res}(f, f')/\operatorname{lc}(f), and thus \operatorname{disc}(f) = \operatorname{lc}(f)^{2n - 2} \prod_{i < j} (r_i - r_j)^2, where n is the degree of f and the r_i are its roots. It is computed as the discriminant of the numerator (_fmpz_poly_discriminant) divided by d^{2n-2}, d being the denominator. Polynomials of degree less than 1 have discriminant zero.
Cite this page
The FLINT team, “fmpq_poly_discriminant (fmpq_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpq_poly/fmpq_poly_discriminant.html (generated 2026-10-20).
@misc{flint-doc-fmpq-poly-fmpq-poly-discriminant,
author = {{The FLINT team}},
title = {{fmpq\_poly\_discriminant (fmpq\_poly.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/fmpq_poly/fmpq_poly_discriminant.html},
note = {Generated 2026-10-20}
}