FLINT3.7.0-dev

dlog_modpe_init, dlog_modpe_clear, dlog_modpe

Synopsis#include <flint/dlog.h>
ulong dlog_modpe_init(dlog_modpe_t t, ulong a, ulong p, ulong e, ulong pe, ulong num)source
void dlog_modpe_clear(dlog_modpe_t t)source
ulong dlog_modpe(const dlog_modpe_t t, ulong b)source

Initialise t for num logarithms to the base a modulo \mathit{pe} = p^e; free it; and return \log_a(b), combining the logarithm of b \bmod p modulo p - 1 with the logarithm of b^{p-1} in 1 + p\mathbb{Z}, which determines \log_a(b) modulo p^{e-1}. For p = 2 the base must be 5 (or a generator of the elements congruent to 1 modulo 4) and b \equiv 1 \pmod 4; this case uses dlog_mod2e.

Cite this page

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