bernoulli
(n) ¶bernoulli
(n, x)
¶Numerically evaluate Bernoulli numbers and polynomials.
Examples:
bernoulli (6) ⇒ 0.023810 bernoulli (7) ⇒ 0
Note there are two conventions in the literature about the sign of B_1, but for certain the absolute value is one half:
abs (bernoulli (1)) ⇒ 0.5000
As of 2023, this numerical evaluation function is in a state of flux about which one it takes, see ‘@sym/bernoulli’.
Polynomial example:
bernoulli (2, pi) ⇒ 6.8947
Note this function may be slow for large numbers of inputs. This is because it is not a native double-precision implementation.
See also: @sym/bernoulli.
Package: symbolic