3 <meta http-equiv=
"Content-Type" content=
"text/html; charset=US-ASCII">
4 <title>Jacobi Zeta Function
</title>
5 <link rel=
"stylesheet" href=
"../../math.css" type=
"text/css">
6 <meta name=
"generator" content=
"DocBook XSL Stylesheets V1.77.1">
7 <link rel=
"home" href=
"../../index.html" title=
"Math Toolkit 2.5.1">
8 <link rel=
"up" href=
"../ellint.html" title=
"Elliptic Integrals">
9 <link rel=
"prev" href=
"ellint_d.html" title=
"Elliptic Integral D - Legendre Form">
10 <link rel=
"next" href=
"heuman_lambda.html" title=
"Heuman Lambda Function">
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>
22 <div class=
"spirit-nav">
23 <a accesskey=
"p" href=
"ellint_d.html"><img src=
"../../../../../../doc/src/images/prev.png" alt=
"Prev"></a><a accesskey=
"u" href=
"../ellint.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=
"heuman_lambda.html"><img src=
"../../../../../../doc/src/images/next.png" alt=
"Next"></a>
26 <div class=
"titlepage"><div><div><h3 class=
"title">
27 <a name=
"math_toolkit.ellint.jacobi_zeta"></a><a class=
"link" href=
"jacobi_zeta.html" title=
"Jacobi Zeta Function">Jacobi Zeta Function
</a>
28 </h3></div></div></div>
30 <a name=
"math_toolkit.ellint.jacobi_zeta.h0"></a>
31 <span class=
"phrase"><a name=
"math_toolkit.ellint.jacobi_zeta.synopsis"></a></span><a class=
"link" href=
"jacobi_zeta.html#math_toolkit.ellint.jacobi_zeta.synopsis">Synopsis
</a>
33 <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">jacobi_zeta
</span><span class=
"special">.
</span><span class=
"identifier">hpp
</span><span class=
"special">></span>
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>
37 <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>
38 <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">jacobi_zeta
</span><span class=
"special">(
</span><span class=
"identifier">T1
</span> <span class=
"identifier">k
</span><span class=
"special">,
</span> <span class=
"identifier">T2
</span> <span class=
"identifier">phi
</span><span class=
"special">);
</span>
40 <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> <a class=
"link" href=
"../../policy.html" title=
"Chapter 15. Policies: Controlling Precision, Error Handling etc">Policy
</a><span class=
"special">></span>
41 <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">jacobi_zeta
</span><span class=
"special">(
</span><span class=
"identifier">T1
</span> <span class=
"identifier">k
</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 15. Policies: Controlling Precision, Error Handling etc">Policy
</a><span class=
"special">&);
</span>
43 <span class=
"special">}}
</span> <span class=
"comment">// namespaces
</span>
46 <a name=
"math_toolkit.ellint.jacobi_zeta.h1"></a>
47 <span class=
"phrase"><a name=
"math_toolkit.ellint.jacobi_zeta.description"></a></span><a class=
"link" href=
"jacobi_zeta.html#math_toolkit.ellint.jacobi_zeta.description">Description
</a>
50 This function evaluates the Jacobi Zeta Function
<span class=
"emphasis"><em>Z(
φ, k)
</em></span>
53 <span class=
"inlinemediaobject"><img src=
"../../../equations/jacobi_zeta.svg"></span>
56 The return type of this function is computed using the __arg_pomotion_rules
57 when the arguments are of different types: when they are the same type then
58 the result is the same type as the arguments.
61 Requires
<span class=
"emphasis"><em>-
1 <= k
<=
1</em></span>, otherwise returns the result
62 of
<a class=
"link" href=
"../error_handling.html#math_toolkit.error_handling.domain_error">domain_error
</a>
63 (outside this range the result would be complex).
66 The final
<a class=
"link" href=
"../../policy.html" title=
"Chapter 15. 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 15. Policies: Controlling Precision, Error Handling etc">policy
69 documentation for more details
</a>.
72 Note that there is no complete analogue of this function (where
φ =
π /
2) as
73 this takes the value
0 for all
<span class=
"emphasis"><em>k
</em></span>.
76 <a name=
"math_toolkit.ellint.jacobi_zeta.h2"></a>
77 <span class=
"phrase"><a name=
"math_toolkit.ellint.jacobi_zeta.accuracy"></a></span><a class=
"link" href=
"jacobi_zeta.html#math_toolkit.ellint.jacobi_zeta.accuracy">Accuracy
</a>
80 These functions are trivially computed in terms of other elliptic integrals
81 and generally have very low error rates (a few epsilon) unless parameter
83 is very large, in which case the usual trigonometric function argument-reduction
87 <a name=
"math_toolkit.ellint.jacobi_zeta.table_jacobi_zeta"></a><p class=
"title"><b>Table
 6.68.
 Error rates for jacobi_zeta
</b></p>
88 <div class=
"table-contents"><table class=
"table" summary=
"Error rates for jacobi_zeta">
101 Microsoft Visual C++ version
12.0<br> Win32
<br> double
106 GNU C++ version
5.1.0<br> linux
<br> double
111 GNU C++ version
5.1.0<br> linux
<br> long double
116 Sun compiler version
0x5130<br> Sun Solaris
<br> long double
124 Elliptic Integral Jacobi Zeta: Mathworld Data
129 <span class=
"blue">Max =
0.505ε (Mean =
0.119ε)
</span>
134 <span class=
"blue">Max =
0ε (Mean =
0ε)
</span>
139 <span class=
"blue">Max =
1.66ε (Mean =
0.48ε)
</span>
144 <span class=
"blue">Max =
1.66ε (Mean =
0.48ε)
</span>
151 Elliptic Integral Jacobi Zeta: Random Data
156 <span class=
"blue">Max =
3.89ε (Mean =
0.818ε)
</span>
161 <span class=
"blue">Max =
0ε (Mean =
0ε)
</span>
166 <span class=
"blue">Max =
2.99ε (Mean =
0.824ε)
</span>
171 <span class=
"blue">Max =
3.96ε (Mean =
1.06ε)
</span>
178 Elliptic Integral Jacobi Zeta: Large Phi Values
183 <span class=
"blue">Max =
2.92ε (Mean =
0.964ε)
</span>
188 <span class=
"blue">Max =
0ε (Mean =
0ε)
</span>
193 <span class=
"blue">Max =
2.92ε (Mean =
0.951ε)
</span>
198 <span class=
"blue">Max =
3.05ε (Mean =
1.13ε)
</span>
205 <br class=
"table-break"><h5>
206 <a name=
"math_toolkit.ellint.jacobi_zeta.h3"></a>
207 <span class=
"phrase"><a name=
"math_toolkit.ellint.jacobi_zeta.testing"></a></span><a class=
"link" href=
"jacobi_zeta.html#math_toolkit.ellint.jacobi_zeta.testing">Testing
</a>
210 The tests use a mixture of spot test values calculated using values calculated
211 at wolframalpha.com, and random test data generated using MPFR at
1000-bit
212 precision and a deliberately naive implementation in terms of the Legendre
216 <a name=
"math_toolkit.ellint.jacobi_zeta.h4"></a>
217 <span class=
"phrase"><a name=
"math_toolkit.ellint.jacobi_zeta.implementation"></a></span><a class=
"link" href=
"jacobi_zeta.html#math_toolkit.ellint.jacobi_zeta.implementation">Implementation
</a>
220 The implementation for Z(
φ, k) first makes the argument
φ positive using:
223 <span class=
"emphasis"><em>Z(-
φ, k) = -Z(
φ, k)
</em></span>
226 The function is then implemented in terms of Carlson's integral R
<sub>J
</sub>
231 <span class=
"inlinemediaobject"><img src=
"../../../equations/jacobi_zeta.svg"></span>
234 There is one special case where the above relation fails: when
<span class=
"emphasis"><em>k
235 =
1</em></span>, in that case the function simplifies to
238 <span class=
"emphasis"><em>Z(
φ,
1) = sign(cos(
φ)) sin(
φ)
</em></span>
241 <table xmlns:
rev=
"http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width=
"100%"><tr>
242 <td align=
"left"></td>
243 <td align=
"right"><div class=
"copyright-footer">Copyright
© 2006-
2010,
2012-
2014 Nikhar Agrawal,
244 Anton Bikineev, Paul A. Bristow, Marco Guazzone, Christopher Kormanyos, Hubert
245 Holin, Bruno Lalande, John Maddock, Jeremy Murphy, Johan R
åde, Gautam Sewani,
246 Benjamin Sobotta, Thijs van den Berg, Daryle Walker and Xiaogang Zhang
<p>
247 Distributed under the Boost Software License, Version
1.0. (See accompanying
248 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>)
253 <div class=
"spirit-nav">
254 <a accesskey=
"p" href=
"ellint_d.html"><img src=
"../../../../../../doc/src/images/prev.png" alt=
"Prev"></a><a accesskey=
"u" href=
"../ellint.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=
"heuman_lambda.html"><img src=
"../../../../../../doc/src/images/next.png" alt=
"Next"></a>