FLINT3.7.0-dev

nfloat_ctx_set_func_prec, nfloat_ctx_get_func_prec

Synopsis#include <flint/nfloat.h>
int nfloat_ctx_set_func_prec(gr_ctx_t ctx, slong prec)source
slong nfloat_ctx_get_func_prec(gr_ctx_t ctx)source

Set and get the function precision of ctx: the precision in bits to which the elementary functions (exponentials, logarithms, trigonometric and hyperbolic functions, their inverses and powers) are computed. It defaults to the full precision of the context; a value larger than that is clamped to it, and a value less than 1 makes nfloat_ctx_set_func_prec return GR_UNABLE. A smaller function precision makes these functions cheaper (for example, at 64 bits with a function precision of 50 bits, most functions evaluate their kernels with one word instead of two); the arithmetic is unaffected.

Guides#

Cite this page

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