boost/libs/math/doc/html/math_toolkit/ellint/heuman_lambda.html
2021-10-05 21:37:46 +02:00

226 lines
12 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Heuman Lambda Function</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 3.0.0">
<link rel="up" href="../ellint.html" title="Elliptic Integrals">
<link rel="prev" href="jacobi_zeta.html" title="Jacobi Zeta Function">
<link rel="next" href="../jacobi.html" title="Jacobi Elliptic Functions">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<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>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="math_toolkit.ellint.heuman_lambda"></a><a class="link" href="heuman_lambda.html" title="Heuman Lambda Function">Heuman Lambda Function</a>
</h3></div></div></div>
<h5>
<a name="math_toolkit.ellint.heuman_lambda.h0"></a>
<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>
</h5>
<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">heuman_lambda</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
</pre>
<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>
<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>
<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">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>
<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 21. Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">&amp;);</span>
<span class="special">}}</span> <span class="comment">// namespaces</span>
</pre>
<h5>
<a name="math_toolkit.ellint.heuman_lambda.h1"></a>
<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>
</h5>
<p>
This function evaluates the Heuman Lambda Function <span class="emphasis"><em>Λ<sub>0</sub>(φ, k)</em></span>
</p>
<div class="blockquote"><blockquote class="blockquote"><p>
<span class="inlinemediaobject"><img src="../../../equations/heuman_lambda.svg"></span>
</p></blockquote></div>
<p>
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
type calculation rules</em></span></a> when the arguments are of different
types: when they are the same type then the result is the same type as the
arguments.
</p>
<p>
Requires <span class="emphasis"><em>-1 &lt;= k &lt;= 1</em></span>, otherwise returns the result
of <a class="link" href="../error_handling.html#math_toolkit.error_handling.domain_error">domain_error</a>
(outside this range the result would be complex).
</p>
<p>
The final <a class="link" href="../../policy.html" title="Chapter 21. Policies: Controlling Precision, Error Handling etc">Policy</a> argument is optional and can
be used to control the behaviour of the function: how it handles errors,
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
documentation for more details</a>.
</p>
<p>
Note that there is no complete analogue of this function (where φ = π / 2) as
this takes the value 1 for all <span class="emphasis"><em>k</em></span>.
</p>
<h5>
<a name="math_toolkit.ellint.heuman_lambda.h2"></a>
<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>
</h5>
<p>
These functions are trivially computed in terms of other elliptic integrals
and generally have very low error rates (a few epsilon) unless parameter
φ
is very large, in which case the usual trigonometric function argument-reduction
issues apply.
</p>
<div class="table">
<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>
<div class="table-contents"><table class="table" summary="Error rates for heuman_lambda">
<colgroup>
<col>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
</th>
<th>
<p>
GNU C++ version 7.1.0<br> linux<br> double
</p>
</th>
<th>
<p>
GNU C++ version 7.1.0<br> linux<br> long double
</p>
</th>
<th>
<p>
Sun compiler version 0x5150<br> Sun Solaris<br> long double
</p>
</th>
<th>
<p>
Microsoft Visual C++ version 14.1<br> Win32<br> double
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
Elliptic Integral Jacobi Zeta: Mathworld Data
</p>
</td>
<td>
<p>
<span class="blue">Max = 0ε (Mean = 0ε)</span>
</p>
</td>
<td>
<p>
<span class="blue">Max = 1.89ε (Mean = 0.887ε)</span>
</p>
</td>
<td>
<p>
<span class="blue">Max = 1.89ε (Mean = 0.887ε)</span>
</p>
</td>
<td>
<p>
<span class="blue">Max = 1.08ε (Mean = 0.734ε)</span>
</p>
</td>
</tr>
<tr>
<td>
<p>
Elliptic Integral Heuman Lambda: Random Data
</p>
</td>
<td>
<p>
<span class="blue">Max = 0ε (Mean = 0ε)</span>
</p>
</td>
<td>
<p>
<span class="blue">Max = 3.82ε (Mean = 0.609ε)</span>
</p>
</td>
<td>
<p>
<span class="blue">Max = 3.82ε (Mean = 0.608ε)</span>
</p>
</td>
<td>
<p>
<span class="blue">Max = 2.12ε (Mean = 0.588ε)</span>
</p>
</td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><h5>
<a name="math_toolkit.ellint.heuman_lambda.h3"></a>
<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>
</h5>
<p>
The tests use a mixture of spot test values calculated using values calculated
at <a href="http://www.wolframalpha.com/" target="_top">Wolfram Alpha</a>, and random
test data generated using MPFR at 1000-bit precision and a deliberately naive
implementation in terms of the Legendre integrals.
</p>
<h5>
<a name="math_toolkit.ellint.heuman_lambda.h4"></a>
<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>
</h5>
<p>
The function is then implemented in terms of Carlson's integrals R<sub>J</sub> and R<sub>F</sub>
using
the relation:
</p>
<div class="blockquote"><blockquote class="blockquote"><p>
<span class="inlinemediaobject"><img src="../../../equations/heuman_lambda.svg"></span>
</p></blockquote></div>
<p>
This relation fails for <span class="emphasis"><em>|φ| &gt;= π/2</em></span> in which case the
definition in terms of the Jacobi Zeta is used.
</p>
</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 © 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>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<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>
</div>
</body>
</html>