FLINT3.7.0-dev

fmpq_poly_discriminant

Synopsis#include <flint/fmpq_poly.h>
void fmpq_poly_discriminant(fmpq_t res, const fmpq_poly_t poly)source

Set 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).