FLINT3.7.0-dev

qfb_pow_ui, qfb_pow, qfb_pow_with_root

Synopsis#include <flint/qfb.h>
void qfb_pow_ui(qfb_t r, qfb_t f, fmpz_t D, ulong exp)source
void qfb_pow(qfb_t r, qfb_t f, fmpz_t D, fmpz_t exp)source
void qfb_pow_with_root(qfb_t r, qfb_t f, fmpz_t D, fmpz_t exp, fmpz_t L)source

Set r to the reduced form in the class of f^{\mathit{exp}}, by binary powering with NUDUPL and NUCOMP and a reduction after each step. D must be the discriminant of f, which must be primitive. For exponent 0 the result is the principal form and for exponent 1 a copy of f (not reduced if f is not). qfb_pow_with_root takes L = \lfloor |D|^{1/4} \rfloor as an argument instead of computing it. A negative fmpz_t exponent is allowed: the result is then the power -\mathit{exp} of the inverse form (qfb_inverse).

Guides#

Cite this page

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