darkhistory.utilities.bernoulli — DarkHistory documentation

# darkhistory.utilities.bernoulli

`darkhistory.utilities.` `bernoulli`(k)

  The kth Bernoulli number.

  This function is written as a look-up table for the first few Bernoulli numbers for speed. The Bernoulli number definition we use is:

  \[\frac{x}{e^x - 1} \equiv \sum_{n = 0}^\infty \frac{B_n x^n}{n!} \,.\]

  Parameters: | k : int The Bernoulli number to return.
  Returns: | float The kth Bernoulli number.

#### Previous topic

darkhistory.utilities.arrays_equal

#### Next topic

darkhistory.utilities.check_err

### This Page

Show Source