FLINT3.7.0-dev

ca_transfer

Synopsis#include <flint/ca.h>
void ca_transfer(ca_t res, ca_ctx_t res_ctx, const ca_t src, ca_ctx_t src_ctx)source

Sets res, which belongs to res_ctx, to the value of src, which belongs to src_ctx. The value is preserved, but the representation may differ since it depends on the options and cached fields of the target context.

Rational numbers are copied directly. Other values are converted to a symbolic expression with ca_get_fexpr (using CA_FEXPR_SERIALIZATION, so that algebraic numbers are transferred exactly) and rebuilt with ca_set_fexpr in the target context. If the contexts are the same, this is ca_set.

Guides#

Cite this page

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