Skip to main content

bernoulli

Function bernoulli 

Source
pub fn bernoulli(n: usize) -> Vec<f64>
Expand description

The Bernoulli numbers B₀, …, B_n with B₁ = −1/2 (SciPy’s bernoulli). The odd ones beyond B₁ are zero; the even ones come from B_{2k} = (−1)^{k+1} 2 (2k)! ζ(2k) / (2π)^{2k}, accurate to rounding up to n ≈ 260, where they overflow.