FLINT3.7.0-dev

fmpq_mul_2exp, fmpq_div_2exp

Synopsis#include <flint/fmpq.h>
void fmpq_mul_2exp(fmpq_t res, const fmpq_t x, flint_bitcnt_t exp)source
void fmpq_div_2exp(fmpq_t res, const fmpq_t x, flint_bitcnt_t exp)source

Set res to x \cdot 2^{\mathit{exp}} or x / 2^{\mathit{exp}}, cancelling powers of two from the denominator or the numerator first.

Cite this page

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