FLINT3.7.0-dev

ca_get_acb, ca_get_acb_accurate_parts

Synopsis#include <flint/ca.h>
void ca_get_acb(acb_t res, const ca_t x, slong prec, ca_ctx_t ctx)source
void ca_get_acb_accurate_parts(acb_t res, const ca_t x, slong prec, ca_ctx_t ctx)source

Sets res to an enclosure of the value of x, increasing the working precision until the result has a relative accuracy of prec bits, or for the accurate_parts version until the real and the imaginary part separately have prec accurate bits.

The precision starts at about 1.05⋅1.05 \cdot prec and is doubled up to the larger of twice the initial precision and CA_OPT_PREC_LIMIT. At some point an exact test is made, so that an exact zero (or a real or imaginary number, for the accurate_parts version) gives an exact zero (or zero imaginary or real part) instead of a ball that only contains zero. Use acb_rel_accuracy_bits to check whether the requested accuracy was reached. The output is not rounded to prec bits; call acb_set_round for this.

Guides#

Cite this page

The FLINT team, “ca_get_acb, ca_get_acb_accurate_parts (ca.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/ca/ca_get_acb.html (generated 2026-11-02).