FLINT3.7.0-dev

dlog_crt_init, dlog_crt_clear, dlog_crt

Synopsis#include <flint/dlog.h>
ulong dlog_crt_init(dlog_crt_t t, ulong a, ulong mod, ulong n, ulong num)source
void dlog_crt_clear(dlog_crt_t t)source
ulong dlog_crt(const dlog_crt_t t, ulong b)source

Initialise t for num logarithms to the base a of order n modulo mod, by factoring n and initialising dlog_precomp_pe_init for a^{n/p^e} in each subgroup of prime power order (the returned cost is the sum of their costs); free it; and return \log_a(b), combining the logarithms of b^{n/p^e} by the Chinese remainder theorem.

Cite this page

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