bernoulli_rev_t
#include <flint/bernoulli.h>bernoulli_rev_tAn iterator that generates the even-indexed Bernoulli numbers in decreasing order, without caching. An array of length one of bernoulli_rev_struct, whose field n is the index of the next number; the rest of the state is private.
The numbers are computed from the zeta function, in batches of 16 consecutive indices (8 below ): one pass over a table of the odd powers in fixed point, each multiplied by per step [Blo2009], gives the zeta values of the whole batch, and each number is then the product of the prefactor , kept as a floating-point number, by , rounded to an integer with a certified error bound. The precision and the number of terms decrease as decreases. With several threads (flint_set_num_threads), the numbers of a batch are computed in parallel, together with the table pass of the next batch; the threads are requested when a batch starts, so that the iterator runs serially if none are free (for example inside another parallel computation). See The reverse iterator.
References#
- [Blo2009] R. Bloemen, "Even faster zeta(2n) calculation!", https://web.archive.org/web/20141101133659/http://xn--2-umb.com/09/11/even-faster-zeta-calculation
The FLINT team, “bernoulli_rev_t (bernoulli.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/bernoulli/bernoulli_rev_t.html (generated 2026-11-20).
@misc{flint-doc-bernoulli-bernoulli-rev-t,
author = {{The FLINT team}},
title = {{bernoulli\_rev\_t (bernoulli.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/bernoulli/bernoulli_rev_t.html},
note = {Generated 2026-11-20}
}