mp_real_div, mp_real_div_ui
#include <flint/mp_real.h>Set res to a / b resp. a / c. The divisor ball must have a relative radius below 2^{-30}; mp_real_div throws for a wider or zero divisor, and mp_real_div_ui for c = 0.
A divisor ball with a relative radius of 2^{-30} or more is treated as a usage error, since the quotient's mantissa would be noise; use mp_real_get_arb and arb_div for such balls. mp_real_div_ui divides by mpn_divrem_1 over appended zero limbs, keeping the quotient's own precision (an exact dividend gets a quotient of n + 2 limbs), so that a chain of divisions by a common denominator loses no accuracy relative to the quotients.
Guides#
The FLINT team, “mp_real_div, mp_real_div_ui (mp_real.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/mp_real/mp_real_div.html (generated 2026-10-20).
@misc{flint-doc-mp-real-mp-real-div,
author = {{The FLINT team}},
title = {{mp\_real\_div, mp\_real\_div\_ui (mp\_real.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/mp_real/mp_real_div.html},
note = {Generated 2026-10-20}
}