FLINT3.7.0-dev

bernoulli_fmpq_vec_no_cache

Synopsis#include <flint/bernoulli.h>
void bernoulli_fmpq_vec_no_cache(fmpq * res, ulong a, slong num)source

Sets res to the num consecutive Bernoulli numbers B_a, B_{a+1}, \ldots, B_{a + \mathit{num} - 1}, without reading or writing the cache. To reuse a vector, use bernoulli_cache_compute and bernoulli_fmpq_ui instead. Throws if a > 2^{31} or \mathit{num} > 10^9.

For a = 0 and \mathit{num} \le 128 the function calls arith_bernoulli_number_vec. Otherwise it runs reverse iterators over blocks of indices; for \mathit{num} \ge 200 the blocks (of size about (a + \mathit{num})/32, at least 128) are distributed over the threads of flint_set_num_threads. The function is not optimised for small num at large a, where each block costs about as much as B_{a + \mathit{num}} alone.

Cite this page

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