FLINT3.7.0-dev

arf_div, arf_div_ui, arf_ui_div, arf_div_si, arf_si_div, arf_div_fmpz, arf_fmpz_div, arf_fmpz_div_fmpz

Synopsis#include <flint/arf.h>
int arf_div(arf_ptr z, arf_srcptr x, arf_srcptr y, slong prec, arf_rnd_t rnd)source
int arf_div_ui(arf_ptr z, arf_srcptr x, ulong y, slong prec, arf_rnd_t rnd)source
int arf_ui_div(arf_ptr z, ulong x, arf_srcptr y, slong prec, arf_rnd_t rnd)source
int arf_div_si(arf_ptr z, arf_srcptr x, slong y, slong prec, arf_rnd_t rnd)source
int arf_si_div(arf_ptr z, slong x, arf_srcptr y, slong prec, arf_rnd_t rnd)source
int arf_div_fmpz(arf_ptr z, arf_srcptr x, const fmpz_t y, slong prec, arf_rnd_t rnd)source
int arf_fmpz_div(arf_ptr z, const fmpz_t x, arf_srcptr y, slong prec, arf_rnd_t rnd)source
int arf_fmpz_div_fmpz(arf_ptr z, const fmpz_t x, const fmpz_t y, slong prec, arf_rnd_t rnd)source

Set z to x/yx / y, correctly rounded for the strict modes. Division by zero gives NaN. The relaxed modes ARF_RND_FAST and ARF_RND_ACCURATE are accepted.

The quotient kernel _arf_mpn_div (see Limb-array kernels): exact register divisions at up to two limbs and for one-limb divisors (such as the integers of arf_div_ui), the floor with the remainder deciding the rounding; otherwise flint_mpn_divhigh (see Floating-point quotients and roots): the rounding is certified by the guard limb unless it lies within the error bound of a rounding boundary (probability about 2−552^{-55}, but always for exact quotients), in which case the exact truncated quotient and remainder (flint_mpn_divhigh_exact) decide the rounding and the inexact flag. Division by a power of two is a rounding of the numerator.

Guides#

Cite this page

The FLINT team, “arf_div, arf_div_ui, arf_ui_div, arf_div_si, arf_si_div, arf_div_fmpz, arf_fmpz_div, arf_fmpz_div_fmpz (arf.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/arf/arf_div.html (generated 2026-11-20).