[DEV] add v1.76.0

This commit is contained in:
2021-10-05 21:37:46 +02:00
parent a97e9ae7d4
commit d0115b733d
45133 changed files with 4744437 additions and 1026325 deletions

View File

@@ -1,11 +1,11 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>The Lanczos Approximation</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.6.0">
<link rel="up" href="../backgrounders.html" title="Chapter&#160;20.&#160;Backgrounders">
<link rel="home" href="../index.html" title="Math Toolkit 3.0.0">
<link rel="up" href="../backgrounders.html" title="Chapter 23. Backgrounders">
<link rel="prev" href="relative_error.html" title="Relative Error">
<link rel="next" href="remez.html" title="The Remez Method">
</head>
@@ -105,23 +105,26 @@
<p>
The Lanczos Approximation to the Gamma Function is given by:
</p>
<p>
<span class="inlinemediaobject"><img src="../../equations/lanczos0.svg"></span>
</p>
<div class="blockquote"><blockquote class="blockquote"><p>
<span class="inlinemediaobject"><img src="../../equations/lanczos0.svg"></span>
</p></blockquote></div>
<p>
Where S<sub>g</sub>(z) is an infinite sum, that is convergent for all z &gt; 0, and <span class="emphasis"><em>g</em></span>
is an arbitrary parameter that controls the "shape" of the terms
in the sum which is given by:
</p>
<p>
<span class="inlinemediaobject"><img src="../../equations/lanczos0a.svg"></span>
</p>
<div class="blockquote"><blockquote class="blockquote"><p>
<span class="inlinemediaobject"><img src="../../equations/lanczos0a.svg"></span>
</p></blockquote></div>
<p>
With individual coefficients defined in closed form by:
</p>
<p>
<span class="inlinemediaobject"><img src="../../equations/lanczos0b.svg"></span>
</p>
<div class="blockquote"><blockquote class="blockquote"><p>
<span class="inlinemediaobject"><img src="../../equations/lanczos0b.svg"></span>
</p></blockquote></div>
<p>
However, evaluation of the sum in that form can lead to numerical instability
in the computation of the ratios of rising and falling factorials (effectively
@@ -132,15 +135,17 @@
The Lanczos approximation is therefore often written in partial fraction form
with the leading constants absorbed by the coefficients in the sum:
</p>
<p>
<span class="inlinemediaobject"><img src="../../equations/lanczos1.svg"></span>
</p>
<div class="blockquote"><blockquote class="blockquote"><p>
<span class="inlinemediaobject"><img src="../../equations/lanczos1.svg"></span>
</p></blockquote></div>
<p>
where:
</p>
<p>
<span class="inlinemediaobject"><img src="../../equations/lanczos2.svg"></span>
</p>
<div class="blockquote"><blockquote class="blockquote"><p>
<span class="inlinemediaobject"><img src="../../equations/lanczos2.svg"></span>
</p></blockquote></div>
<p>
Again parameter <span class="emphasis"><em>g</em></span> is an arbitrarily chosen constant, and
<span class="emphasis"><em>N</em></span> is an arbitrarily chosen number of terms to evaluate
@@ -177,27 +182,31 @@
<p>
where B is an NxN matrix:
</p>
<p>
<span class="inlinemediaobject"><img src="../../equations/lanczos4.svg"></span>
</p>
<div class="blockquote"><blockquote class="blockquote"><p>
<span class="inlinemediaobject"><img src="../../equations/lanczos4.svg"></span>
</p></blockquote></div>
<p>
D is an NxN matrix:
</p>
<p>
<span class="inlinemediaobject"><img src="../../equations/lanczos3.svg"></span>
</p>
<div class="blockquote"><blockquote class="blockquote"><p>
<span class="inlinemediaobject"><img src="../../equations/lanczos3.svg"></span>
</p></blockquote></div>
<p>
C is an NxN matrix:
</p>
<p>
<span class="inlinemediaobject"><img src="../../equations/lanczos5.svg"></span>
</p>
<div class="blockquote"><blockquote class="blockquote"><p>
<span class="inlinemediaobject"><img src="../../equations/lanczos5.svg"></span>
</p></blockquote></div>
<p>
and F is an N element column vector:
</p>
<p>
<span class="inlinemediaobject"><img src="../../equations/lanczos6.svg"></span>
</p>
<div class="blockquote"><blockquote class="blockquote"><p>
<span class="inlinemediaobject"><img src="../../equations/lanczos6.svg"></span>
</p></blockquote></div>
<p>
Note than the matrices B, D and C contain all integer terms and depend only
on <span class="emphasis"><em>N</em></span>, this product should be computed first, and then
@@ -228,7 +237,7 @@
to float precision with double precision arithmetic.
</p>
<div class="table">
<a name="math_toolkit.lanczos.optimal_choices_for_n_and_g_when"></a><p class="title"><b>Table&#160;20.1.&#160;Optimal choices for N and g when computing with guard digits (source:
<a name="math_toolkit.lanczos.optimal_choices_for_n_and_g_when"></a><p class="title"><b>Table 23.1. Optimal choices for N and g when computing with guard digits (source:
Pugh)</b></p>
<div class="table-contents"><table class="table" summary="Optimal choices for N and g when computing with guard digits (source:
Pugh)">
@@ -372,7 +381,7 @@
epsilon for the type in question.
</p>
<div class="table">
<a name="math_toolkit.lanczos.optimum_value_for_n_and_g_when_c"></a><p class="title"><b>Table&#160;20.2.&#160;Optimum value for N and g when computing at fixed precision</b></p>
<a name="math_toolkit.lanczos.optimum_value_for_n_and_g_when_c"></a><p class="title"><b>Table 23.2. Optimum value for N and g when computing at fixed precision</b></p>
<div class="table-contents"><table class="table" summary="Optimum value for N and g when computing at fixed precision">
<colgroup>
<col>
@@ -525,9 +534,10 @@
a factor of exp(g) from the denominator, and then dividing all the coefficients
by exp(g):
</p>
<p>
<span class="inlinemediaobject"><img src="../../equations/lanczos7.svg"></span>
</p>
<div class="blockquote"><blockquote class="blockquote"><p>
<span class="inlinemediaobject"><img src="../../equations/lanczos7.svg"></span>
</p></blockquote></div>
<p>
This form is more convenient for calculating lgamma, but for the gamma function
the division by <span class="emphasis"><em>e</em></span> turns a possibly exact quality into
@@ -560,11 +570,11 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2006-2010, 2012-2014, 2017 Nikhar
Agrawal, Anton Bikineev, Paul A. Bristow, Marco Guazzone, Christopher Kormanyos,
Hubert Holin, Bruno Lalande, John Maddock, Jeremy Murphy, Johan R&#229;de, Gautam
Sewani, Benjamin Sobotta, Nicholas Thompson, Thijs van den Berg, Daryle Walker
and Xiaogang Zhang<p>
<td align="right"><div class="copyright-footer">Copyright © 2006-2021 Nikhar Agrawal, Anton Bikineev, Matthew Borland,
Paul A. Bristow, Marco Guazzone, Christopher Kormanyos, Hubert Holin, Bruno
Lalande, John Maddock, Evan Miller, Jeremy Murphy, Matthew Pulver, Johan Råde,
Gautam Sewani, Benjamin Sobotta, Nicholas Thompson, Thijs van den Berg, Daryle
Walker and Xiaogang Zhang<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>