ecpp_disc_cost, ecpp_disc_cost_v, ecpp_disc_cost_n
#include <flint/ecpp.h>double ecpp_disc_cost(const ecpp_disc_struct * d)sourcedouble ecpp_disc_cost_v(const ecpp_disc_struct * d, int veven)sourcedouble ecpp_disc_cost_n(const ecpp_disc_struct * d, int veven, const ulong * nmodp, slong bits)sourceThe estimated cost of realising a step with the discriminant d, in units of one scalar multiplication on the curve at a few thousand bits: the twists, the numerical computation of the class polynomials of the class field tower (cheap with Weber's function, which is usable for even D and, through the order of conductor 2, for odd D when the v of 4n = t^2 + |D| v^2 is even, as veven says), and the descent through the prime factors p of h (a square root for p = 2, radicals or a small powering for p = 3, a p-th root or a powering of a degree p polynomial otherwise), or the cost of a root of the genus field factor if that is smaller. ecpp_disc_cost_n uses n modulo 5, 7, 11 and 13 (nmodp, or the average over n if NULL) and scales the cost of the class polynomial numerics, which does not depend on n, to the bit size of n. ecpp_disc_cost is the optimistic estimate (with veven = 1) used to order and admit the pool. Class numbers with a prime factor above 13 get a cost above ECPP_DISC_COST_MAX.
The FLINT team, “ecpp_disc_cost, ecpp_disc_cost_v, ecpp_disc_cost_n (ecpp.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/ecpp/ecpp_disc_cost.html (generated 2026-10-20).
@misc{flint-doc-ecpp-ecpp-disc-cost,
author = {{The FLINT team}},
title = {{ecpp\_disc\_cost, ecpp\_disc\_cost\_v, ecpp\_disc\_cost\_n (ecpp.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/ecpp/ecpp_disc_cost.html},
note = {Generated 2026-10-20}
}