3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>Heuman Lambda Function</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.11.0">
8 <link rel="up" href="../ellint.html" title="Elliptic Integrals">
9 <link rel="prev" href="jacobi_zeta.html" title="Jacobi Zeta Function">
10 <link rel="next" href="../jacobi.html" title="Jacobi Elliptic Functions">
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="jacobi_zeta.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="../jacobi.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.heuman_lambda"></a><a class="link" href="heuman_lambda.html" title="Heuman Lambda Function">Heuman Lambda Function</a>
28 </h3></div></div></div>
30 <a name="math_toolkit.ellint.heuman_lambda.h0"></a>
31 <span class="phrase"><a name="math_toolkit.ellint.heuman_lambda.synopsis"></a></span><a class="link" href="heuman_lambda.html#math_toolkit.ellint.heuman_lambda.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">heuman_lambda</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">heuman_lambda</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 20. 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">heuman_lambda</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 20. 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.heuman_lambda.h1"></a>
47 <span class="phrase"><a name="math_toolkit.ellint.heuman_lambda.description"></a></span><a class="link" href="heuman_lambda.html#math_toolkit.ellint.heuman_lambda.description">Description</a>
50 This function evaluates the Heuman Lambda Function <span class="emphasis"><em>Λ<sub>0</sub>(φ, k)</em></span>
52 <div class="blockquote"><blockquote class="blockquote"><p>
53 <span class="inlinemediaobject"><img src="../../../equations/heuman_lambda.svg"></span>
55 </p></blockquote></div>
57 The return type of this function is computed using the <a class="link" href="../result_type.html" title="Calculation of the Type of the Result"><span class="emphasis"><em>result
58 type calculation rules</em></span></a> when the arguments are of different
59 types: when they are the same type then the result is the same type as the
63 Requires <span class="emphasis"><em>-1 <= k <= 1</em></span>, otherwise returns the result
64 of <a class="link" href="../error_handling.html#math_toolkit.error_handling.domain_error">domain_error</a>
65 (outside this range the result would be complex).
68 The final <a class="link" href="../../policy.html" title="Chapter 20. Policies: Controlling Precision, Error Handling etc">Policy</a> argument is optional and can
69 be used to control the behaviour of the function: how it handles errors,
70 what level of precision to use etc. Refer to the <a class="link" href="../../policy.html" title="Chapter 20. Policies: Controlling Precision, Error Handling etc">policy
71 documentation for more details</a>.
74 Note that there is no complete analogue of this function (where φ = π / 2) as
75 this takes the value 1 for all <span class="emphasis"><em>k</em></span>.
78 <a name="math_toolkit.ellint.heuman_lambda.h2"></a>
79 <span class="phrase"><a name="math_toolkit.ellint.heuman_lambda.accuracy"></a></span><a class="link" href="heuman_lambda.html#math_toolkit.ellint.heuman_lambda.accuracy">Accuracy</a>
82 These functions are trivially computed in terms of other elliptic integrals
83 and generally have very low error rates (a few epsilon) unless parameter
85 is very large, in which case the usual trigonometric function argument-reduction
89 <a name="math_toolkit.ellint.heuman_lambda.table_heuman_lambda"></a><p class="title"><b>Table 8.69. Error rates for heuman_lambda</b></p>
90 <div class="table-contents"><table class="table" summary="Error rates for heuman_lambda">
103 GNU C++ version 7.1.0<br> linux<br> double
108 GNU C++ version 7.1.0<br> linux<br> long double
113 Sun compiler version 0x5150<br> Sun Solaris<br> long double
118 Microsoft Visual C++ version 14.1<br> Win32<br> double
126 Elliptic Integral Jacobi Zeta: Mathworld Data
131 <span class="blue">Max = 0ε (Mean = 0ε)</span>
136 <span class="blue">Max = 1.89ε (Mean = 0.887ε)</span>
141 <span class="blue">Max = 1.89ε (Mean = 0.887ε)</span>
146 <span class="blue">Max = 1.08ε (Mean = 0.734ε)</span>
153 Elliptic Integral Heuman Lambda: Random Data
158 <span class="blue">Max = 0ε (Mean = 0ε)</span>
163 <span class="blue">Max = 3.82ε (Mean = 0.609ε)</span>
168 <span class="blue">Max = 3.82ε (Mean = 0.608ε)</span>
173 <span class="blue">Max = 2.12ε (Mean = 0.588ε)</span>
180 <br class="table-break"><h5>
181 <a name="math_toolkit.ellint.heuman_lambda.h3"></a>
182 <span class="phrase"><a name="math_toolkit.ellint.heuman_lambda.testing"></a></span><a class="link" href="heuman_lambda.html#math_toolkit.ellint.heuman_lambda.testing">Testing</a>
185 The tests use a mixture of spot test values calculated using values calculated
186 at <a href="http://www.wolframalpha.com/" target="_top">Wolfram Alpha</a>, and random
187 test data generated using MPFR at 1000-bit precision and a deliberately naive
188 implementation in terms of the Legendre integrals.
191 <a name="math_toolkit.ellint.heuman_lambda.h4"></a>
192 <span class="phrase"><a name="math_toolkit.ellint.heuman_lambda.implementation"></a></span><a class="link" href="heuman_lambda.html#math_toolkit.ellint.heuman_lambda.implementation">Implementation</a>
195 The function is then implemented in terms of Carlson's integrals R<sub>J</sub> and R<sub>F</sub>
199 <div class="blockquote"><blockquote class="blockquote"><p>
200 <span class="inlinemediaobject"><img src="../../../equations/heuman_lambda.svg"></span>
202 </p></blockquote></div>
204 This relation fails for <span class="emphasis"><em>|φ| >= π/2</em></span> in which case the
205 definition in terms of the Jacobi Zeta is used.
208 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
209 <td align="left"></td>
210 <td align="right"><div class="copyright-footer">Copyright © 2006-2019 Nikhar
211 Agrawal, Anton Bikineev, Paul A. Bristow, Marco Guazzone, Christopher Kormanyos,
212 Hubert Holin, Bruno Lalande, John Maddock, Jeremy Murphy, Matthew Pulver, Johan
213 Råde, Gautam Sewani, Benjamin Sobotta, Nicholas Thompson, Thijs van den Berg,
214 Daryle Walker and Xiaogang Zhang<p>
215 Distributed under the Boost Software License, Version 1.0. (See accompanying
216 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>)
221 <div class="spirit-nav">
222 <a accesskey="p" href="jacobi_zeta.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="../jacobi.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>