FLINT3.7.0-dev

arith_bernoulli_number, _arith_bernoulli_number

Synopsis#include <flint/arith.h>
void arith_bernoulli_number(fmpq_t x, ulong n)source
void _arith_bernoulli_number(fmpz_t num, fmpz_t den, ulong n)source

Set the result to the Bernoulli number B_n, in lowest terms with a positive denominator. Wrappers of bernoulli_fmpq_ui: the value is read from the Bernoulli cache if present and otherwise computed from the zeta function or by the multimodular algorithm.

Cite this page

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