FLINT3.7.0-dev

padic_ctx_init

Synopsis#include <flint/padic.h>
void padic_ctx_init(padic_ctx_t ctx, const fmpz_t p, slong min, slong max, enum padic_print_mode mode)source

Initialises ctx for the prime p with precomputed powers p^e for \mathtt{min} \le e < \mathtt{max} and the given printing mode. Throws unless 0 \le \mathtt{min} \le \mathtt{max}. That p is prime is not checked; for composite p the behaviour is undefined.

The table is used by every reduction modulo p^{N - v}, so it should cover the differences N - v that occur, typically from 0 to a little more than the largest precision in use. Other powers are computed when needed. With \mathtt{min} = \mathtt{max} no table is stored.

Guides#

Cite this page

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