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 Ba,Ba+1,…,Ba+num−1B_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>231a > 2^{31} or num>109\mathit{num} > 10^9.

For a=0a = 0 and num≤128\mathit{num} \le 128 the function calls arith_bernoulli_number_vec. Otherwise it runs reverse iterators over blocks of indices; for num≥200\mathit{num} \ge 200 the blocks (of size about (a+num)/32(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 aa, where each block costs about as much as Ba+numB_{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-11-02).