Skip to main content

bernoulli_b2n

Function bernoulli_b2n 

Source
pub fn bernoulli_b2n<E: BernoulliNumbers>(n: usize) -> Option<E>
Expand description

$B_{2n}$, or None when it is not tabulated: either $n = 0$, or $B_{2n}$ overflows E.

The argument is n as in $B_{2n}$, following the mathematics rather than the slice index, so bernoulli_b2n::<f64>(1) is $B_2$, the first entry. Reach for BernoulliNumbers::B2N directly when iterating, where entry i is $B_{2i+2}$.

Last built: 2026-09-08 21:35:55 UTC