FLINT3.7.0-dev

acf_inv, acf_div

Synopsis#include <flint/acf.h>
int acf_inv(acf_t res, const acf_t x, slong prec, arf_rnd_t rnd)source
int acf_div(acf_t res, const acf_t x, const acf_t y, slong prec, arf_rnd_t rnd)source

Set res to 1/x1/x, respectively x/yx/y, with each part correctly rounded (the relaxed modes as described above): 1/(a+bi)=(a−bi)/(a2+b2)1/(a + bi) = (a - bi)/(a^2 + b^2) and (a+bi)/(c+di)=((ac+bd)+(bc−ad)i)/(c2+d2)(a + bi)/(c + di) = ((ac + bd) + (bc - ad) i) / (c^2 + d^2) with the numerators and the denominator formed exactly, so that each part is one correctly rounded quotient of exact numbers; when the terms of a sum lie more than 2prec+1282 \mathit{prec} + 128 bits apart (so that they cannot cancel) the sum is rounded to prec + 64 bits instead, the quotient certified from its error bound, and a part that this leaves undecided decided exactly by the sign of N−βsN - \beta s for its exact numerator NN, the denominator ss and the rounding boundary β\beta next to it (a sum of exact terms, whatever their sizes). A real or purely imaginary divisor is handled by real divisions of the parts; a zero divisor gives the results of arf_div (infinities and nan).

Cite this page

The FLINT team, “acf_inv, acf_div (acf.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/acf/acf_inv.html (generated 2026-11-17).