FLINT3.7.0-dev

bernoulli_rev_init

Synopsis#include <flint/bernoulli.h>
void bernoulli_rev_init(bernoulli_rev_t iter, ulong n)source

Initialises iter so that the first call to bernoulli_rev_next returns BnB_n. An odd nn is replaced by n−1n - 1. Throws if n>n > BERNOULLI_REV_NMAX. The table is built on the threads available, without temporaries beyond itself, and takes about m2/24m^2/24 bits of memory for the current index mm (5 GB for m=106m = 10^6), or about 8/158/15 of that from n=105n = 10^5, where the powers of the jj divisible by 3 or 5 are left out (see The reverse iterator), being given back as the iteration proceeds; each thread working in it adds some 60 numbers of the size of BmB_m.

Cite this page

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