FLINT3.7.0-dev

qfb_exponent_element

Synopsis#include <flint/qfb.h>
int qfb_exponent_element(fmpz_t exponent, qfb_t f, fmpz_t n, ulong B1, ulong B2_sqrt)source

Tries to find the order of the class of the reduced primitive form f in the class group of discriminant n. Returns 1 and sets exponent to the order on success, and returns 0 if the order is not of the form s \cdot q with s a product of prime powers below about B1 and q a prime below about B2_sqrt squared.

The function raises f to products of the primes up to B1, in batches of increasing size, until the principal form appears, then determines the exact power of each prime (stage 1). If this fails it looks for a single larger prime factor with a baby-step giant-step search (stage 2), which stores about B2_sqrt forms in a hash table. See Orders and the exponent.

Guides#

Cite this page

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