FLINT3.7.0-dev

ecpp_root_radicals

Synopsis#include <flint/ecpp.h>
int ecpp_root_radicals(fmpz_t x, const fmpz_mod_poly_t f, flint_rand_t state, const fmpz_mod_ctx_t ctx)source

Sets x to a root of the monic polynomial f of degree 2, 3 or 4, assumed to split completely modulo the prime modulus n of ctx, by radicals (Cardano, Ferrari): a few square and cube roots modulo n, some ten times cheaper than a powering of a polynomial modulo f. Degrees 3 and 4 require n \equiv 1 \pmod 3. Returns 1 on success and 0 if the degree or n is not handled or the computation failed.

Cite this page

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