• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>Spherical Harmonics</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 2.12.0">
8<link rel="up" href="../sf_poly.html" title="Polynomials">
9<link rel="prev" href="chebyshev.html" title="Chebyshev Polynomials">
10<link rel="next" href="cardinal_b_splines.html" title="Cardinal B-splines">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13<table cellpadding="2" width="100%"><tr>
14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
15<td align="center"><a href="../../../../../../index.html">Home</a></td>
16<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
20</tr></table>
21<hr>
22<div class="spirit-nav">
23<a accesskey="p" href="chebyshev.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="cardinal_b_splines.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="section">
26<div class="titlepage"><div><div><h3 class="title">
27<a name="math_toolkit.sf_poly.sph_harm"></a><a class="link" href="sph_harm.html" title="Spherical Harmonics">Spherical Harmonics</a>
28</h3></div></div></div>
29<h5>
30<a name="math_toolkit.sf_poly.sph_harm.h0"></a>
31        <span class="phrase"><a name="math_toolkit.sf_poly.sph_harm.synopsis"></a></span><a class="link" href="sph_harm.html#math_toolkit.sf_poly.sph_harm.synopsis">Synopsis</a>
32      </h5>
33<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</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">spherical_harmonic</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
34</pre>
35<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>
36
37<span class="keyword">template</span> <span class="special">&lt;</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">&gt;</span>
38<span class="identifier">std</span><span class="special">::</span><span class="identifier">complex</span><span class="special">&lt;</span><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="special">&gt;</span> <span class="identifier">spherical_harmonic</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="identifier">n</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">T1</span> <span class="identifier">theta</span><span class="special">,</span> <span class="identifier">T2</span> <span class="identifier">phi</span><span class="special">);</span>
39
40<span class="keyword">template</span> <span class="special">&lt;</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> <a class="link" href="../../policy.html" title="Chapter 21. Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">&gt;</span>
41<span class="identifier">std</span><span class="special">::</span><span class="identifier">complex</span><span class="special">&lt;</span><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="special">&gt;</span> <span class="identifier">spherical_harmonic</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="identifier">n</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">T1</span> <span class="identifier">theta</span><span class="special">,</span> <span class="identifier">T2</span> <span class="identifier">phi</span><span class="special">,</span> <span class="keyword">const</span> <a class="link" href="../../policy.html" title="Chapter 21. Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">&amp;);</span>
42
43<span class="keyword">template</span> <span class="special">&lt;</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">&gt;</span>
44<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">spherical_harmonic_r</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="identifier">n</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">T1</span> <span class="identifier">theta</span><span class="special">,</span> <span class="identifier">T2</span> <span class="identifier">phi</span><span class="special">);</span>
45
46<span class="keyword">template</span> <span class="special">&lt;</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> <a class="link" href="../../policy.html" title="Chapter 21. Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">&gt;</span>
47<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">spherical_harmonic_r</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="identifier">n</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">T1</span> <span class="identifier">theta</span><span class="special">,</span> <span class="identifier">T2</span> <span class="identifier">phi</span><span class="special">,</span> <span class="keyword">const</span> <a class="link" href="../../policy.html" title="Chapter 21. Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">&amp;);</span>
48
49<span class="keyword">template</span> <span class="special">&lt;</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">&gt;</span>
50<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">spherical_harmonic_i</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="identifier">n</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">T1</span> <span class="identifier">theta</span><span class="special">,</span> <span class="identifier">T2</span> <span class="identifier">phi</span><span class="special">);</span>
51
52<span class="keyword">template</span> <span class="special">&lt;</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> <a class="link" href="../../policy.html" title="Chapter 21. Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">&gt;</span>
53<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">spherical_harmonic_i</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="identifier">n</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">T1</span> <span class="identifier">theta</span><span class="special">,</span> <span class="identifier">T2</span> <span class="identifier">phi</span><span class="special">,</span> <span class="keyword">const</span> <a class="link" href="../../policy.html" title="Chapter 21. Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">&amp;);</span>
54
55<span class="special">}}</span> <span class="comment">// namespaces</span>
56</pre>
57<h5>
58<a name="math_toolkit.sf_poly.sph_harm.h1"></a>
59        <span class="phrase"><a name="math_toolkit.sf_poly.sph_harm.description"></a></span><a class="link" href="sph_harm.html#math_toolkit.sf_poly.sph_harm.description">Description</a>
60      </h5>
61<p>
62        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
63        type calculation rules</em></span></a> when T1 and T2 are different types.
64      </p>
65<p>
66        The final <a class="link" href="../../policy.html" title="Chapter 21. Policies: Controlling Precision, Error Handling etc">Policy</a> argument is optional and can
67        be used to control the behaviour of the function: how it handles errors,
68        what level of precision to use etc. Refer to the <a class="link" href="../../policy.html" title="Chapter 21. Policies: Controlling Precision, Error Handling etc">policy
69        documentation for more details</a>.
70      </p>
71<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</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">&gt;</span>
72<span class="identifier">std</span><span class="special">::</span><span class="identifier">complex</span><span class="special">&lt;</span><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="special">&gt;</span> <span class="identifier">spherical_harmonic</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="identifier">n</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">T1</span> <span class="identifier">theta</span><span class="special">,</span> <span class="identifier">T2</span> <span class="identifier">phi</span><span class="special">);</span>
73
74<span class="keyword">template</span> <span class="special">&lt;</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> <a class="link" href="../../policy.html" title="Chapter 21. Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">&gt;</span>
75<span class="identifier">std</span><span class="special">::</span><span class="identifier">complex</span><span class="special">&lt;</span><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="special">&gt;</span> <span class="identifier">spherical_harmonic</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="identifier">n</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">T1</span> <span class="identifier">theta</span><span class="special">,</span> <span class="identifier">T2</span> <span class="identifier">phi</span><span class="special">,</span> <span class="keyword">const</span> <a class="link" href="../../policy.html" title="Chapter 21. Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">&amp;);</span>
76</pre>
77<p>
78        Returns the value of the Spherical Harmonic Y<sub>n</sub><sup>m</sup>(theta, phi):
79      </p>
80<div class="blockquote"><blockquote class="blockquote"><p>
81          <span class="inlinemediaobject"><img src="../../../equations/spherical_0.svg"></span>
82
83        </p></blockquote></div>
84<p>
85        The spherical harmonics Y<sub>n</sub><sup>m</sup>(theta, phi) are the angular portion of the solution
86        to Laplace's equation in spherical coordinates where azimuthal symmetry is
87        not present.
88      </p>
89<div class="caution"><table border="0" summary="Caution">
90<tr>
91<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../../../../../../doc/src/images/caution.png"></td>
92<th align="left">Caution</th>
93</tr>
94<tr><td align="left" valign="top">
95<p>
96          Care must be taken in correctly identifying the arguments to this function:
97          θ is taken as the polar (colatitudinal) coordinate with θ in [0, π], and φas
98          the azimuthal (longitudinal) coordinate with φin [0,2π). This is the convention
99          used in Physics, and matches the definition used by <a href="http://documents.wolfram.com/mathematica/functions/SphericalHarmonicY" target="_top">Mathematica
100          in the function SpericalHarmonicY</a>, but is opposite to the usual
101          mathematical conventions.
102        </p>
103<p>
104          Some other sources include an additional Condon-Shortley phase term of
105          (-1)<sup>m</sup> in the definition of this function: note however that our definition
106          of the associated Legendre polynomial already includes this term.
107        </p>
108<p>
109          This implementation returns zero for m &gt; n
110        </p>
111<p>
112          For θ outside [0, π] and φ outside [0, 2π] this implementation follows the convention
113          used by Mathematica: the function is periodic with period π in θ and 2π in φ.
114          Please note that this is not the behaviour one would get from a casual
115          application of the function's definition. Cautious users should keep θ and
116          φ to the range [0, π] and [0, 2π] respectively.
117        </p>
118<p>
119          See: <a href="http://mathworld.wolfram.com/SphericalHarmonic.html" target="_top">Weisstein,
120          Eric W. "Spherical Harmonic." From MathWorld--A Wolfram Web Resource</a>.
121        </p>
122</td></tr>
123</table></div>
124<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</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">&gt;</span>
125<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">spherical_harmonic_r</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="identifier">n</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">T1</span> <span class="identifier">theta</span><span class="special">,</span> <span class="identifier">T2</span> <span class="identifier">phi</span><span class="special">);</span>
126
127<span class="keyword">template</span> <span class="special">&lt;</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> <a class="link" href="../../policy.html" title="Chapter 21. Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">&gt;</span>
128<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">spherical_harmonic_r</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="identifier">n</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">T1</span> <span class="identifier">theta</span><span class="special">,</span> <span class="identifier">T2</span> <span class="identifier">phi</span><span class="special">,</span> <span class="keyword">const</span> <a class="link" href="../../policy.html" title="Chapter 21. Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">&amp;);</span>
129</pre>
130<p>
131        Returns the real part of Y<sub>n</sub><sup>m</sup>(theta, phi):
132      </p>
133<div class="blockquote"><blockquote class="blockquote"><p>
134          <span class="inlinemediaobject"><img src="../../../equations/spherical_1.svg"></span>
135
136        </p></blockquote></div>
137<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</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">&gt;</span>
138<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">spherical_harmonic_i</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="identifier">n</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">T1</span> <span class="identifier">theta</span><span class="special">,</span> <span class="identifier">T2</span> <span class="identifier">phi</span><span class="special">);</span>
139
140<span class="keyword">template</span> <span class="special">&lt;</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> <a class="link" href="../../policy.html" title="Chapter 21. Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">&gt;</span>
141<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">spherical_harmonic_i</span><span class="special">(</span><span class="keyword">unsigned</span> <span class="identifier">n</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">T1</span> <span class="identifier">theta</span><span class="special">,</span> <span class="identifier">T2</span> <span class="identifier">phi</span><span class="special">,</span> <span class="keyword">const</span> <a class="link" href="../../policy.html" title="Chapter 21. Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">&amp;);</span>
142</pre>
143<p>
144        Returns the imaginary part of Y<sub>n</sub><sup>m</sup>(theta, phi):
145      </p>
146<div class="blockquote"><blockquote class="blockquote"><p>
147          <span class="inlinemediaobject"><img src="../../../equations/spherical_2.svg"></span>
148
149        </p></blockquote></div>
150<h5>
151<a name="math_toolkit.sf_poly.sph_harm.h2"></a>
152        <span class="phrase"><a name="math_toolkit.sf_poly.sph_harm.accuracy"></a></span><a class="link" href="sph_harm.html#math_toolkit.sf_poly.sph_harm.accuracy">Accuracy</a>
153      </h5>
154<p>
155        The following table shows peak errors for various domains of input arguments.
156        Note that only results for the widest floating point type on the system are
157        given as narrower types have <a class="link" href="../relative_error.html#math_toolkit.relative_error.zero_error">effectively
158        zero error</a>. Peak errors are the same for both the real and imaginary
159        parts, as the error is dominated by calculation of the associated Legendre
160        polynomials: especially near the roots of the associated Legendre function.
161      </p>
162<p>
163        All values are in units of epsilon.
164      </p>
165<div class="table">
166<a name="math_toolkit.sf_poly.sph_harm.table_spherical_harmonic_r"></a><p class="title"><b>Table 8.38. Error rates for spherical_harmonic_r</b></p>
167<div class="table-contents"><table class="table" summary="Error rates for spherical_harmonic_r">
168<colgroup>
169<col>
170<col>
171<col>
172<col>
173<col>
174</colgroup>
175<thead><tr>
176<th>
177              </th>
178<th>
179                <p>
180                  GNU C++ version 7.1.0<br> linux<br> double
181                </p>
182              </th>
183<th>
184                <p>
185                  GNU C++ version 7.1.0<br> linux<br> long double
186                </p>
187              </th>
188<th>
189                <p>
190                  Sun compiler version 0x5150<br> Sun Solaris<br> long double
191                </p>
192              </th>
193<th>
194                <p>
195                  Microsoft Visual C++ version 14.1<br> Win32<br> double
196                </p>
197              </th>
198</tr></thead>
199<tbody><tr>
200<td>
201                <p>
202                  Spherical Harmonics
203                </p>
204              </td>
205<td>
206                <p>
207                  <span class="blue">Max = 1.58ε (Mean = 0.0707ε)</span>
208                </p>
209              </td>
210<td>
211                <p>
212                  <span class="blue">Max = 2.89e+03ε (Mean = 108ε)</span>
213                </p>
214              </td>
215<td>
216                <p>
217                  <span class="blue">Max = 1.03e+04ε (Mean = 327ε)</span>
218                </p>
219              </td>
220<td>
221                <p>
222                  <span class="blue">Max = 2.27e+04ε (Mean = 725ε)</span>
223                </p>
224              </td>
225</tr></tbody>
226</table></div>
227</div>
228<br class="table-break"><div class="table">
229<a name="math_toolkit.sf_poly.sph_harm.table_spherical_harmonic_i"></a><p class="title"><b>Table 8.39. Error rates for spherical_harmonic_i</b></p>
230<div class="table-contents"><table class="table" summary="Error rates for spherical_harmonic_i">
231<colgroup>
232<col>
233<col>
234<col>
235<col>
236<col>
237</colgroup>
238<thead><tr>
239<th>
240              </th>
241<th>
242                <p>
243                  GNU C++ version 7.1.0<br> linux<br> double
244                </p>
245              </th>
246<th>
247                <p>
248                  GNU C++ version 7.1.0<br> linux<br> long double
249                </p>
250              </th>
251<th>
252                <p>
253                  Sun compiler version 0x5150<br> Sun Solaris<br> long double
254                </p>
255              </th>
256<th>
257                <p>
258                  Microsoft Visual C++ version 14.1<br> Win32<br> double
259                </p>
260              </th>
261</tr></thead>
262<tbody><tr>
263<td>
264                <p>
265                  Spherical Harmonics
266                </p>
267              </td>
268<td>
269                <p>
270                  <span class="blue">Max = 1.36ε (Mean = 0.0765ε)</span>
271                </p>
272              </td>
273<td>
274                <p>
275                  <span class="blue">Max = 2.89e+03ε (Mean = 108ε)</span>
276                </p>
277              </td>
278<td>
279                <p>
280                  <span class="blue">Max = 1.03e+04ε (Mean = 327ε)</span>
281                </p>
282              </td>
283<td>
284                <p>
285                  <span class="blue">Max = 2.27e+04ε (Mean = 725ε)</span>
286                </p>
287              </td>
288</tr></tbody>
289</table></div>
290</div>
291<br class="table-break"><p>
292        Note that the worst errors occur when the degree increases, values greater
293        than ~120 are very unlikely to produce sensible results, especially when
294        the order is also large. Further the relative errors are likely to grow arbitrarily
295        large when the function is very close to a root.
296      </p>
297<h5>
298<a name="math_toolkit.sf_poly.sph_harm.h3"></a>
299        <span class="phrase"><a name="math_toolkit.sf_poly.sph_harm.testing"></a></span><a class="link" href="sph_harm.html#math_toolkit.sf_poly.sph_harm.testing">Testing</a>
300      </h5>
301<p>
302        A mixture of spot tests of values calculated using functions.wolfram.com,
303        and randomly generated test data are used: the test data was computed using
304        <a href="http://shoup.net/ntl/doc/RR.txt" target="_top">NTL::RR</a> at 1000-bit
305        precision.
306      </p>
307<h5>
308<a name="math_toolkit.sf_poly.sph_harm.h4"></a>
309        <span class="phrase"><a name="math_toolkit.sf_poly.sph_harm.implementation"></a></span><a class="link" href="sph_harm.html#math_toolkit.sf_poly.sph_harm.implementation">Implementation</a>
310      </h5>
311<p>
312        These functions are implemented fairly naively using the formulae given above.
313        Some extra care is taken to prevent roundoff error when converting from polar
314        coordinates (so for example the <span class="emphasis"><em>1-x<sup>2</sup></em></span> term used by the
315        associated Legendre functions is calculated without roundoff error using
316        <span class="emphasis"><em>x = cos(theta)</em></span>, and <span class="emphasis"><em>1-x<sup>2</sup> = sin<sup>2</sup>(theta)</em></span>).
317        The limiting factor in the error rates for these functions is the need to
318        calculate values near the roots of the associated Legendre functions.
319      </p>
320</div>
321<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
322<td align="left"></td>
323<td align="right"><div class="copyright-footer">Copyright © 2006-2019 Nikhar
324      Agrawal, Anton Bikineev, Paul A. Bristow, Marco Guazzone, Christopher Kormanyos,
325      Hubert Holin, Bruno Lalande, John Maddock, Jeremy Murphy, Matthew Pulver, Johan
326      Råde, Gautam Sewani, Benjamin Sobotta, Nicholas Thompson, Thijs van den Berg,
327      Daryle Walker and Xiaogang Zhang<p>
328        Distributed under the Boost Software License, Version 1.0. (See accompanying
329        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>)
330      </p>
331</div></td>
332</tr></table>
333<hr>
334<div class="spirit-nav">
335<a accesskey="p" href="chebyshev.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="cardinal_b_splines.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
336</div>
337</body>
338</html>
339