FLINT3.7.0-dev

nfloat_ctx_init

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

Initialises ctx to the ring of floating-point numbers with precision prec bits rounded up to a whole number of words (for example, prec = 53 gives 64-bit precision), with the given flags (a bitwise or of the flags below, or 0). Returns GR_UNABLE without initialising ctx if prec is not positive or exceeds the maximum NFLOAT_MAX_LIMBS * FLINT_BITS, and GR_SUCCESS otherwise. The context needs no memory and is cleared with gr_ctx_clear.

Guides#

Cite this page

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