<title>Bernoulli Numbers</title>
<link rel="stylesheet" href="../../math.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
-<link rel="home" href="../../index.html" title="Math Toolkit 2.10.0">
+<link rel="home" href="../../index.html" title="Math Toolkit 2.11.0">
<link rel="up" href="../number_series.html" title="Number Series">
<link rel="prev" href="../number_series.html" title="Number Series">
<link rel="next" href="tangent_numbers.html" title="Tangent Numbers">
may provide a better interface for performance critical code.
</p>
<p>
- The final <a class="link" href="../../policy.html" title="Chapter 19. Policies: Controlling Precision, Error Handling etc">Policy</a> argument is optional and can
+ The final <a class="link" href="../../policy.html" title="Chapter 20. Policies: Controlling Precision, Error Handling etc">Policy</a> argument is optional and can
be used to control the behaviour of the function: how it handles errors,
what level of precision to use, etc.
</p>
<p>
- Refer to <a class="link" href="../../policy.html" title="Chapter 19. Policies: Controlling Precision, Error Handling etc">Policies</a> for more details.
+ Refer to <a class="link" href="../../policy.html" title="Chapter 20. Policies: Controlling Precision, Error Handling etc">Policies</a> for more details.
</p>
<h5>
<a name="math_toolkit.number_series.bernoulli_numbers.h3"></a>
These return a series of Bernoulli numbers:
</p>
<div class="blockquote"><blockquote class="blockquote"><p>
- B<sub>2*start_index</sub>,B<sub>2*(start_index+1)</sub>,...,B<sub>2*(start_index+number_of_bernoullis_b2n-1)</sub>
+ <span class="serif_italic">[B<sub>2*start_index</sub>, B<sub>2*(start_index+1)</sub>, ..., B<sub>2*(start_index+number_of_bernoullis_b2n-1)</sub>]</span>
</p></blockquote></div>
<h5>
<a name="math_toolkit.number_series.bernoulli_numbers.h9"></a>
is given by Brent and Harvey's equation 14:
</p>
<p>
-    <span class="inlinemediaobject"><img src="../../../equations/tangent_numbers.svg"></span>
+   
</p>
+<div class="blockquote"><blockquote class="blockquote"><p>
+ <span class="inlinemediaobject"><img src="../../../equations/tangent_numbers.svg"></span>
+
+ </p></blockquote></div>
<p>
Their relation with Bernoulli numbers <span class="emphasis"><em>B<sub>i</sub></em></span> are defined
by
</p>
<p>
- if i > 0 and i is even then    <span class="inlinemediaobject"><img src="../../../equations/bernoulli_numbers.svg"></span> <br> elseif
- i == 0 then <span class="emphasis"><em>B<sub>i</sub></em></span> = 1 <br> elseif i == 1 then <span class="emphasis"><em>B<sub>i</sub></em></span>
- = -1/2 <br> elseif i < 0 or i is odd then <span class="emphasis"><em>B<sub>i</sub></em></span> =
- 0
+ if i > 0 and i is even then
+ </p>
+<div class="blockquote"><blockquote class="blockquote"><p>
+ <span class="inlinemediaobject"><img src="../../../equations/bernoulli_numbers.svg"></span>
+
+ </p></blockquote></div>
+<p>
+ <br> elseif i == 0 then <span class="emphasis"><em>B<sub>i</sub></em></span> = 1 <br> elseif i ==
+ 1 then <span class="emphasis"><em>B<sub>i</sub></em></span> = -1/2 <br> elseif i < 0 or i is odd
+ then <span class="emphasis"><em>B<sub>i</sub></em></span> = 0
</p>
<p>
Note that computed values are stored in a fixed-size table, access is thread
our cache, an asymptotic expansion <a href="http://www.luschny.de/math/primes/bernincl.html" target="_top">due
to Luschny</a> is used:
</p>
-<p>
- <span class="inlinemediaobject"><img src="../../../equations/bernoulli_numbers2.svg"></span>
- </p>
+<div class="blockquote"><blockquote class="blockquote"><p>
+ <span class="inlinemediaobject"><img src="../../../equations/bernoulli_numbers2.svg"></span>
+
+ </p></blockquote></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>