FLINT3.7.0-dev

mp_real_prec_limbs, mp_real_prec_bits

Synopsis#include <flint/mp_real.h>
slong mp_real_prec_limbs(slong prec_limbs)source
slong mp_real_prec_bits(slong prec_bits)source

Return the working precision n in limbs for a target relative accuracy \varepsilon = B^{-\mathit{prec\_limbs}} resp. 2^{-\mathit{prec\_bits}}: prec_limbs resp. \lceil \mathit{prec\_bits} / \mathtt{FLINT\_BITS} \rceil plus MP_REAL_PREC_GUARD.

At this precision the basic operations mp_real_add, mp_real_sub, mp_real_mul, mp_real_div, mp_real_sqrt, mp_real_rsqrt, mp_real_mul_ui, mp_real_div_ui and mp_real_addmul_ui return a relative radius of at most 4\varepsilon on exact operands and at most 16\varepsilon on operands of relative radius at most \varepsilon (for sums of operands of like signs and differences without cancellation). Without the guard limb a product of exact operands could lose a whole limb.

Guides#

Cite this page

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