| 1 |
<html> |
| 2 |
<head> |
| 3 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| 4 |
<title>Laguerre (and Associated) Polynomials</title> |
| 5 |
<link rel="stylesheet" href="../../math.css" type="text/css"> |
| 6 |
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> |
| 7 |
<link rel="home" href="../../index.html" title="Math Toolkit 4.2.1"> |
| 8 |
<link rel="up" href="../sf_poly.html" title="Polynomials"> |
| 9 |
<link rel="prev" href="legendre_stieltjes.html" title="Legendre-Stieltjes Polynomials"> |
| 10 |
<link rel="next" href="hermite.html" title="Hermite Polynomials"> |
| 11 |
<meta name="viewport" content="width=device-width, initial-scale=1"> |
| 12 |
</head> |
| 13 |
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
| 14 |
<table cellpadding="2" width="100%"><tr> |
| 15 |
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> |
| 16 |
<td align="center"><a href="../../../../../../index.html">Home</a></td> |
| 17 |
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> |
| 18 |
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> |
| 19 |
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> |
| 20 |
<td align="center"><a href="../../../../../../more/index.htm">More</a></td> |
| 21 |
</tr></table> |
| 22 |
<hr> |
| 23 |
<div class="spirit-nav"> |
| 24 |
<a accesskey="p" href="legendre_stieltjes.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../sf_poly.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="hermite.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> |
| 25 |
</div> |
| 26 |
<div class="section"> |
| 27 |
<div class="titlepage"><div><div><h3 class="title"> |
| 28 |
<a name="math_toolkit.sf_poly.laguerre"></a><a class="link" href="laguerre.html" title="Laguerre (and Associated) Polynomials">Laguerre (and Associated) |
| 29 |
Polynomials</a> |
| 30 |
</h3></div></div></div> |
| 31 |
<h5> |
| 32 |
<a name="math_toolkit.sf_poly.laguerre.h0"></a> |
| 33 |
<span class="phrase"><a name="math_toolkit.sf_poly.laguerre.synopsis"></a></span><a class="link" href="laguerre.html#math_toolkit.sf_poly.laguerre.synopsis">Synopsis</a> |
| 34 |
</h5> |
| 35 |
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">special_functions</span><span class="special">/</span><span class="identifier">laguerre</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> |
| 36 |
</pre> |
| 37 |
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">math</span><span class="special">{</span> |
| 38 |
|
| 39 |
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span> |
| 40 |
<a class="link" href="../result_type.html" title="Calculation of the Type of the Result"><span class="emphasis"><em>calculated-result-type</em></span></a> <span class="identifier">laguerre</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="identifier">n</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">x</span><span class="special">);</span> |
| 41 |
|
| 42 |
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <a class="link" href="../../policy.html" title="Chapter 22. Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">></span> |
| 43 |
<a class="link" href="../result_type.html" title="Calculation of the Type of the Result"><span class="emphasis"><em>calculated-result-type</em></span></a> <span class="identifier">laguerre</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="identifier">n</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">const</span> <a class="link" href="../../policy.html" title="Chapter 22. Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">&);</span> |
| 44 |
|
| 45 |
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span> |
| 46 |
<a class="link" href="../result_type.html" title="Calculation of the Type of the Result"><span class="emphasis"><em>calculated-result-type</em></span></a> <span class="identifier">laguerre</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="identifier">n</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">x</span><span class="special">);</span> |
| 47 |
|
| 48 |
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <a class="link" href="../../policy.html" title="Chapter 22. Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">></span> |
| 49 |
<a class="link" href="../result_type.html" title="Calculation of the Type of the Result"><span class="emphasis"><em>calculated-result-type</em></span></a> <span class="identifier">laguerre</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="identifier">n</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">const</span> <a class="link" href="../../policy.html" title="Chapter 22. Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">&);</span> |
| 50 |
|
| 51 |
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T3</span><span class="special">></span> |
| 52 |
<a class="link" href="../result_type.html" title="Calculation of the Type of the Result"><span class="emphasis"><em>calculated-result-type</em></span></a> <span class="identifier">laguerre_next</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="identifier">n</span><span class="special">,</span> <span class="identifier">T1</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">T2</span> <span class="identifier">Ln</span><span class="special">,</span> <span class="identifier">T3</span> <span class="identifier">Lnm1</span><span class="special">);</span> |
| 53 |
|
| 54 |
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T3</span><span class="special">></span> |
| 55 |
<a class="link" href="../result_type.html" title="Calculation of the Type of the Result"><span class="emphasis"><em>calculated-result-type</em></span></a> <span class="identifier">laguerre_next</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="identifier">n</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">T1</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">T2</span> <span class="identifier">Ln</span><span class="special">,</span> <span class="identifier">T3</span> <span class="identifier">Lnm1</span><span class="special">);</span> |
| 56 |
|
| 57 |
|
| 58 |
<span class="special">}}</span> <span class="comment">// namespaces</span> |
| 59 |
</pre> |
| 60 |
<h5> |
| 61 |
<a name="math_toolkit.sf_poly.laguerre.h1"></a> |
| 62 |
<span class="phrase"><a name="math_toolkit.sf_poly.laguerre.description"></a></span><a class="link" href="laguerre.html#math_toolkit.sf_poly.laguerre.description">Description</a> |
| 63 |
</h5> |
| 64 |
<p> |
| 65 |
The return type of these functions is computed using the <a class="link" href="../result_type.html" title="Calculation of the Type of the Result"><span class="emphasis"><em>result |
| 66 |
type calculation rules</em></span></a>: note than when there is a single |
| 67 |
template argument the result is the same type as that argument or <code class="computeroutput"><span class="keyword">double</span></code> if the template argument is an integer |
| 68 |
type. |
| 69 |
</p> |
| 70 |
<p> |
| 71 |
The final <a class="link" href="../../policy.html" title="Chapter 22. Policies: Controlling Precision, Error Handling etc">Policy</a> argument is optional and can |
| 72 |
be used to control the behaviour of the function: how it handles errors, |
| 73 |
what level of precision to use etc. Refer to the <a class="link" href="../../policy.html" title="Chapter 22. Policies: Controlling Precision, Error Handling etc">policy |
| 74 |
documentation for more details</a>. |
| 75 |
</p> |
| 76 |
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span> |
| 77 |
<a class="link" href="../result_type.html" title="Calculation of the Type of the Result"><span class="emphasis"><em>calculated-result-type</em></span></a> <span class="identifier">laguerre</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="identifier">n</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">x</span><span class="special">);</span> |
| 78 |
|
| 79 |
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <a class="link" href="../../policy.html" title="Chapter 22. Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">></span> |
| 80 |
<a class="link" href="../result_type.html" title="Calculation of the Type of the Result"><span class="emphasis"><em>calculated-result-type</em></span></a> <span class="identifier">laguerre</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="identifier">n</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">const</span> <a class="link" href="../../policy.html" title="Chapter 22. Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">&);</span> |
| 81 |
</pre> |
| 82 |
<p> |
| 83 |
Returns the value of the Laguerre Polynomial of order <span class="emphasis"><em>n</em></span> |
| 84 |
at point <span class="emphasis"><em>x</em></span>: |
| 85 |
</p> |
| 86 |
<div class="blockquote"><blockquote class="blockquote"><p> |
| 87 |
<span class="inlinemediaobject"><img src="../../../equations/laguerre_0.svg"></span> |
| 88 |
|
| 89 |
</p></blockquote></div> |
| 90 |
<p> |
| 91 |
The following graph illustrates the behaviour of the first few Laguerre Polynomials: |
| 92 |
</p> |
| 93 |
<div class="blockquote"><blockquote class="blockquote"><p> |
| 94 |
<span class="inlinemediaobject"><img src="../../../graphs/laguerre.svg" align="middle"></span> |
| 95 |
|
| 96 |
</p></blockquote></div> |
| 97 |
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span> |
| 98 |
<a class="link" href="../result_type.html" title="Calculation of the Type of the Result"><span class="emphasis"><em>calculated-result-type</em></span></a> <span class="identifier">laguerre</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="identifier">n</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">x</span><span class="special">);</span> |
| 99 |
|
| 100 |
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <a class="link" href="../../policy.html" title="Chapter 22. Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">></span> |
| 101 |
<a class="link" href="../result_type.html" title="Calculation of the Type of the Result"><span class="emphasis"><em>calculated-result-type</em></span></a> <span class="identifier">laguerre</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="identifier">n</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">const</span> <a class="link" href="../../policy.html" title="Chapter 22. Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">&);</span> |
| 102 |
</pre> |
| 103 |
<p> |
| 104 |
Returns the Associated Laguerre polynomial of degree <span class="emphasis"><em>n</em></span> |
| 105 |
and order <span class="emphasis"><em>m</em></span> at point <span class="emphasis"><em>x</em></span>: |
| 106 |
</p> |
| 107 |
<div class="blockquote"><blockquote class="blockquote"><p> |
| 108 |
<span class="inlinemediaobject"><img src="../../../equations/laguerre_1.svg"></span> |
| 109 |
|
| 110 |
</p></blockquote></div> |
| 111 |
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T3</span><span class="special">></span> |
| 112 |
<a class="link" href="../result_type.html" title="Calculation of the Type of the Result"><span class="emphasis"><em>calculated-result-type</em></span></a> <span class="identifier">laguerre_next</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="identifier">n</span><span class="special">,</span> <span class="identifier">T1</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">T2</span> <span class="identifier">Ln</span><span class="special">,</span> <span class="identifier">T3</span> <span class="identifier">Lnm1</span><span class="special">);</span> |
| 113 |
</pre> |
| 114 |
<p> |
| 115 |
Implements the three term recurrence relation for the Laguerre polynomials, |
| 116 |
this function can be used to create a sequence of values evaluated at the |
| 117 |
same <span class="emphasis"><em>x</em></span>, and for rising <span class="emphasis"><em>n</em></span>. |
| 118 |
</p> |
| 119 |
<div class="blockquote"><blockquote class="blockquote"><p> |
| 120 |
<span class="inlinemediaobject"><img src="../../../equations/laguerre_2.svg"></span> |
| 121 |
|
| 122 |
</p></blockquote></div> |
| 123 |
<p> |
| 124 |
For example we could produce a vector of the first 10 polynomial values using: |
| 125 |
</p> |
| 126 |
<pre class="programlisting"><span class="keyword">double</span> <span class="identifier">x</span> <span class="special">=</span> <span class="number">0.5</span><span class="special">;</span> <span class="comment">// Abscissa value</span> |
| 127 |
<span class="identifier">vector</span><span class="special"><</span><span class="keyword">double</span><span class="special">></span> <span class="identifier">v</span><span class="special">;</span> |
| 128 |
<span class="identifier">v</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="identifier">laguerre</span><span class="special">(</span><span class="number">0</span><span class="special">,</span> <span class="identifier">x</span><span class="special">)).</span><span class="identifier">push_back</span><span class="special">(</span><span class="identifier">laguerre</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="identifier">x</span><span class="special">));</span> |
| 129 |
<span class="keyword">for</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="identifier">l</span> <span class="special">=</span> <span class="number">1</span><span class="special">;</span> <span class="identifier">l</span> <span class="special"><</span> <span class="number">10</span><span class="special">;</span> <span class="special">++</span><span class="identifier">l</span><span class="special">)</span> |
| 130 |
<span class="identifier">v</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="identifier">laguerre_next</span><span class="special">(</span><span class="identifier">l</span><span class="special">,</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">v</span><span class="special">[</span><span class="identifier">l</span><span class="special">],</span> <span class="identifier">v</span><span class="special">[</span><span class="identifier">l</span><span class="special">-</span><span class="number">1</span><span class="special">]));</span> |
| 131 |
</pre> |
| 132 |
<p> |
| 133 |
Formally the arguments are: |
| 134 |
</p> |
| 135 |
<div class="variablelist"> |
| 136 |
<p class="title"><b></b></p> |
| 137 |
<dl class="variablelist"> |
| 138 |
<dt><span class="term">n</span></dt> |
| 139 |
<dd><p> |
| 140 |
The degree <span class="emphasis"><em>n</em></span> of the last polynomial calculated. |
| 141 |
</p></dd> |
| 142 |
<dt><span class="term">x</span></dt> |
| 143 |
<dd><p> |
| 144 |
The abscissa value |
| 145 |
</p></dd> |
| 146 |
<dt><span class="term">Ln</span></dt> |
| 147 |
<dd><p> |
| 148 |
The value of the polynomial evaluated at degree <span class="emphasis"><em>n</em></span>. |
| 149 |
</p></dd> |
| 150 |
<dt><span class="term">Lnm1</span></dt> |
| 151 |
<dd><p> |
| 152 |
The value of the polynomial evaluated at degree <span class="emphasis"><em>n-1</em></span>. |
| 153 |
</p></dd> |
| 154 |
</dl> |
| 155 |
</div> |
| 156 |
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T2</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T3</span><span class="special">></span> |
| 157 |
<a class="link" href="../result_type.html" title="Calculation of the Type of the Result"><span class="emphasis"><em>calculated-result-type</em></span></a> <span class="identifier">laguerre_next</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="identifier">n</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">T1</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">T2</span> <span class="identifier">Ln</span><span class="special">,</span> <span class="identifier">T3</span> <span class="identifier">Lnm1</span><span class="special">);</span> |
| 158 |
</pre> |
| 159 |
<p> |
| 160 |
Implements the three term recurrence relation for the Associated Laguerre |
| 161 |
polynomials, this function can be used to create a sequence of values evaluated |
| 162 |
at the same <span class="emphasis"><em>x</em></span>, and for rising degree <span class="emphasis"><em>n</em></span>. |
| 163 |
</p> |
| 164 |
<div class="blockquote"><blockquote class="blockquote"><p> |
| 165 |
<span class="inlinemediaobject"><img src="../../../equations/laguerre_3.svg"></span> |
| 166 |
|
| 167 |
</p></blockquote></div> |
| 168 |
<p> |
| 169 |
For example we could produce a vector of the first 10 polynomial values using: |
| 170 |
</p> |
| 171 |
<pre class="programlisting"><span class="keyword">double</span> <span class="identifier">x</span> <span class="special">=</span> <span class="number">0.5</span><span class="special">;</span> <span class="comment">// Abscissa value</span> |
| 172 |
<span class="keyword">int</span> <span class="identifier">m</span> <span class="special">=</span> <span class="number">10</span><span class="special">;</span> <span class="comment">// order</span> |
| 173 |
<span class="identifier">vector</span><span class="special"><</span><span class="keyword">double</span><span class="special">></span> <span class="identifier">v</span><span class="special">;</span> |
| 174 |
<span class="identifier">v</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="identifier">laguerre</span><span class="special">(</span><span class="number">0</span><span class="special">,</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">x</span><span class="special">)).</span><span class="identifier">push_back</span><span class="special">(</span><span class="identifier">laguerre</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">x</span><span class="special">));</span> |
| 175 |
<span class="keyword">for</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="identifier">l</span> <span class="special">=</span> <span class="number">1</span><span class="special">;</span> <span class="identifier">l</span> <span class="special"><</span> <span class="number">10</span><span class="special">;</span> <span class="special">++</span><span class="identifier">l</span><span class="special">)</span> |
| 176 |
<span class="identifier">v</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="identifier">laguerre_next</span><span class="special">(</span><span class="identifier">l</span><span class="special">,</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">v</span><span class="special">[</span><span class="identifier">l</span><span class="special">],</span> <span class="identifier">v</span><span class="special">[</span><span class="identifier">l</span><span class="special">-</span><span class="number">1</span><span class="special">]));</span> |
| 177 |
</pre> |
| 178 |
<p> |
| 179 |
Formally the arguments are: |
| 180 |
</p> |
| 181 |
<div class="variablelist"> |
| 182 |
<p class="title"><b></b></p> |
| 183 |
<dl class="variablelist"> |
| 184 |
<dt><span class="term">n</span></dt> |
| 185 |
<dd><p> |
| 186 |
The degree of the last polynomial calculated. |
| 187 |
</p></dd> |
| 188 |
<dt><span class="term">m</span></dt> |
| 189 |
<dd><p> |
| 190 |
The order of the Associated Polynomial. |
| 191 |
</p></dd> |
| 192 |
<dt><span class="term">x</span></dt> |
| 193 |
<dd><p> |
| 194 |
The abscissa value. |
| 195 |
</p></dd> |
| 196 |
<dt><span class="term">Ln</span></dt> |
| 197 |
<dd><p> |
| 198 |
The value of the polynomial evaluated at degree <span class="emphasis"><em>n</em></span>. |
| 199 |
</p></dd> |
| 200 |
<dt><span class="term">Lnm1</span></dt> |
| 201 |
<dd><p> |
| 202 |
The value of the polynomial evaluated at degree <span class="emphasis"><em>n-1</em></span>. |
| 203 |
</p></dd> |
| 204 |
</dl> |
| 205 |
</div> |
| 206 |
<h5> |
| 207 |
<a name="math_toolkit.sf_poly.laguerre.h2"></a> |
| 208 |
<span class="phrase"><a name="math_toolkit.sf_poly.laguerre.accuracy"></a></span><a class="link" href="laguerre.html#math_toolkit.sf_poly.laguerre.accuracy">Accuracy</a> |
| 209 |
</h5> |
| 210 |
<p> |
| 211 |
The following table shows peak errors (in units of epsilon) for various domains |
| 212 |
of input arguments. Note that only results for the widest floating point |
| 213 |
type on the system are given as narrower types have <a class="link" href="../relative_error.html#math_toolkit.relative_error.zero_error">effectively |
| 214 |
zero error</a>. |
| 215 |
</p> |
| 216 |
<div class="table"> |
| 217 |
<a name="math_toolkit.sf_poly.laguerre.table_laguerre_n_x_"></a><p class="title"><b>Table 8.35. Error rates for laguerre(n, x)</b></p> |
| 218 |
<div class="table-contents"><table class="table" summary="Error rates for laguerre(n, x)"> |
| 219 |
<colgroup> |
| 220 |
<col> |
| 221 |
<col> |
| 222 |
<col> |
| 223 |
<col> |
| 224 |
<col> |
| 225 |
</colgroup> |
| 226 |
<thead><tr> |
| 227 |
<th> |
| 228 |
</th> |
| 229 |
<th> |
| 230 |
<p> |
| 231 |
GNU C++ version 7.1.0<br> linux<br> double |
| 232 |
</p> |
| 233 |
</th> |
| 234 |
<th> |
| 235 |
<p> |
| 236 |
GNU C++ version 7.1.0<br> linux<br> long double |
| 237 |
</p> |
| 238 |
</th> |
| 239 |
<th> |
| 240 |
<p> |
| 241 |
Sun compiler version 0x5150<br> Sun Solaris<br> long double |
| 242 |
</p> |
| 243 |
</th> |
| 244 |
<th> |
| 245 |
<p> |
| 246 |
Microsoft Visual C++ version 14.1<br> Win32<br> double |
| 247 |
</p> |
| 248 |
</th> |
| 249 |
</tr></thead> |
| 250 |
<tbody><tr> |
| 251 |
<td> |
| 252 |
<p> |
| 253 |
Laguerre Polynomials |
| 254 |
</p> |
| 255 |
</td> |
| 256 |
<td> |
| 257 |
<p> |
| 258 |
<span class="blue">Max = 6.82ε (Mean = 0.408ε)</span><br> <br> |
| 259 |
(<span class="emphasis"><em>GSL 2.1:</em></span> Max = 3.1e+03ε (Mean = 185ε)) |
| 260 |
</p> |
| 261 |
</td> |
| 262 |
<td> |
| 263 |
<p> |
| 264 |
<span class="blue">Max = 1.39e+04ε (Mean = 828ε)</span><br> |
| 265 |
<br> (<span class="emphasis"><em><cmath>:</em></span> Max = 4.2e+03ε (Mean |
| 266 |
= 251ε)) |
| 267 |
</p> |
| 268 |
</td> |
| 269 |
<td> |
| 270 |
<p> |
| 271 |
<span class="blue">Max = 1.39e+04ε (Mean = 828ε)</span> |
| 272 |
</p> |
| 273 |
</td> |
| 274 |
<td> |
| 275 |
<p> |
| 276 |
<span class="blue">Max = 3.1e+03ε (Mean = 185ε)</span> |
| 277 |
</p> |
| 278 |
</td> |
| 279 |
</tr></tbody> |
| 280 |
</table></div> |
| 281 |
</div> |
| 282 |
<br class="table-break"><div class="table"> |
| 283 |
<a name="math_toolkit.sf_poly.laguerre.table_laguerre_n_m_x_"></a><p class="title"><b>Table 8.36. Error rates for laguerre(n, m, x)</b></p> |
| 284 |
<div class="table-contents"><table class="table" summary="Error rates for laguerre(n, m, x)"> |
| 285 |
<colgroup> |
| 286 |
<col> |
| 287 |
<col> |
| 288 |
<col> |
| 289 |
<col> |
| 290 |
<col> |
| 291 |
</colgroup> |
| 292 |
<thead><tr> |
| 293 |
<th> |
| 294 |
</th> |
| 295 |
<th> |
| 296 |
<p> |
| 297 |
GNU C++ version 7.1.0<br> linux<br> double |
| 298 |
</p> |
| 299 |
</th> |
| 300 |
<th> |
| 301 |
<p> |
| 302 |
GNU C++ version 7.1.0<br> linux<br> long double |
| 303 |
</p> |
| 304 |
</th> |
| 305 |
<th> |
| 306 |
<p> |
| 307 |
Sun compiler version 0x5150<br> Sun Solaris<br> long double |
| 308 |
</p> |
| 309 |
</th> |
| 310 |
<th> |
| 311 |
<p> |
| 312 |
Microsoft Visual C++ version 14.1<br> Win32<br> double |
| 313 |
</p> |
| 314 |
</th> |
| 315 |
</tr></thead> |
| 316 |
<tbody><tr> |
| 317 |
<td> |
| 318 |
<p> |
| 319 |
Associated Laguerre Polynomials |
| 320 |
</p> |
| 321 |
</td> |
| 322 |
<td> |
| 323 |
<p> |
| 324 |
<span class="blue">Max = 0.84ε (Mean = 0.0358ε)</span><br> <br> |
| 325 |
(<span class="emphasis"><em>GSL 2.1:</em></span> Max = 434ε (Mean = 10.7ε)) |
| 326 |
</p> |
| 327 |
</td> |
| 328 |
<td> |
| 329 |
<p> |
| 330 |
<span class="blue">Max = 167ε (Mean = 6.38ε)</span><br> <br> |
| 331 |
(<span class="emphasis"><em><cmath>:</em></span> Max = 206ε (Mean = 6.86ε)) |
| 332 |
</p> |
| 333 |
</td> |
| 334 |
<td> |
| 335 |
<p> |
| 336 |
<span class="blue">Max = 167ε (Mean = 6.38ε)</span> |
| 337 |
</p> |
| 338 |
</td> |
| 339 |
<td> |
| 340 |
<p> |
| 341 |
<span class="blue">Max = 434ε (Mean = 11.1ε)</span> |
| 342 |
</p> |
| 343 |
</td> |
| 344 |
</tr></tbody> |
| 345 |
</table></div> |
| 346 |
</div> |
| 347 |
<br class="table-break"><p> |
| 348 |
Note that the worst errors occur when the degree increases, values greater |
| 349 |
than ~120 are very unlikely to produce sensible results, especially in the |
| 350 |
associated polynomial case when the order is also large. Further the relative |
| 351 |
errors are likely to grow arbitrarily large when the function is very close |
| 352 |
to a root. |
| 353 |
</p> |
| 354 |
<h5> |
| 355 |
<a name="math_toolkit.sf_poly.laguerre.h3"></a> |
| 356 |
<span class="phrase"><a name="math_toolkit.sf_poly.laguerre.testing"></a></span><a class="link" href="laguerre.html#math_toolkit.sf_poly.laguerre.testing">Testing</a> |
| 357 |
</h5> |
| 358 |
<p> |
| 359 |
A mixture of spot tests of values calculated using functions.wolfram.com, |
| 360 |
and randomly generated test data are used: the test data was computed using |
| 361 |
<a href="http://shoup.net/ntl/doc/RR.txt" target="_top">NTL::RR</a> at 1000-bit |
| 362 |
precision. |
| 363 |
</p> |
| 364 |
<h5> |
| 365 |
<a name="math_toolkit.sf_poly.laguerre.h4"></a> |
| 366 |
<span class="phrase"><a name="math_toolkit.sf_poly.laguerre.implementation"></a></span><a class="link" href="laguerre.html#math_toolkit.sf_poly.laguerre.implementation">Implementation</a> |
| 367 |
</h5> |
| 368 |
<p> |
| 369 |
These functions are implemented using the stable three term recurrence relations. |
| 370 |
These relations guarantee low absolute error but cannot guarantee low relative |
| 371 |
error near one of the roots of the polynomials. |
| 372 |
</p> |
| 373 |
</div> |
| 374 |
<div class="copyright-footer">Copyright © 2006-2021 Nikhar Agrawal, Anton Bikineev, Matthew Borland, |
| 375 |
Paul A. Bristow, Marco Guazzone, Christopher Kormanyos, Hubert Holin, Bruno |
| 376 |
Lalande, John Maddock, Evan Miller, Jeremy Murphy, Matthew Pulver, Johan Råde, |
| 377 |
Gautam Sewani, Benjamin Sobotta, Nicholas Thompson, Thijs van den Berg, Daryle |
| 378 |
Walker and Xiaogang Zhang<p> |
| 379 |
Distributed under the Boost Software License, Version 1.0. (See accompanying |
| 380 |
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>) |
| 381 |
</p> |
| 382 |
</div> |
| 383 |
<hr> |
| 384 |
<div class="spirit-nav"> |
| 385 |
<a accesskey="p" href="legendre_stieltjes.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../sf_poly.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="hermite.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> |
| 386 |
</div> |
| 387 |
</body> |
| 388 |
</html> |