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 tt for num logarithms to the base aa modulo pe=pe\mathit{pe} = p^e; free it; and return log⁡a(b)\log_a(b), combining the logarithm of b mod pb \bmod p modulo p−1p - 1 with the logarithm of bp−1b^{p-1} in 1+pZ1 + p\mathbb{Z}, which determines log⁡a(b)\log_a(b) modulo pe−1p^{e-1}. For p=2p = 2 the base must be 5 (or a generator of the elements congruent to 1 modulo 4) and b≡1(mod4)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-11-02).