FLINT3.7.0-dev

arf_mul, arf_mul_ui, arf_mul_si, arf_mul_mpz, arf_mul_fmpz

Synopsis#include <flint/arf.h>
int arf_mul(arf_ptr z, arf_srcptr x, arf_srcptr y, slong prec, arf_rnd_t rnd)source
int arf_mul_ui(arf_ptr z, arf_srcptr x, ulong y, slong prec, arf_rnd_t rnd)source
int arf_mul_si(arf_ptr z, arf_srcptr x, slong y, slong prec, arf_rnd_t rnd)source
int arf_mul_mpz(arf_ptr z, arf_srcptr x, const mpz_t y, slong prec, arf_rnd_t rnd)source
int arf_mul_fmpz(arf_ptr z, arf_srcptr x, const fmpz_t y, slong prec, arf_rnd_t rnd)source

Set z to xy, correctly rounded.

arf_mul is a macro that calls arf_mul_rnd_down for ARF_RND_DOWN and arf_mul_rnd_any otherwise. Rounding down is the mode used by ball arithmetic, and arf_mul_rnd_down has dedicated code for one- and two-limb operands; for operands between 25 limbs and a few hundred limbs it calls MPFR, whose short product computes only the top half of the mantissa.

Cite this page

The FLINT team, “arf_mul, arf_mul_ui, arf_mul_si, arf_mul_mpz, arf_mul_fmpz (arf.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/arf/arf_mul.html (generated 2026-10-20).