9
3

heuman_lambda.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. <html>
  2. <head>
  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">
  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="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>
  24. </div>
  25. <div class="section">
  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>
  29. <h5>
  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>
  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">heuman_lambda</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. <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>
  37. <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>
  38. <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&#160;20.&#160;Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">&gt;</span>
  39. <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&#160;20.&#160;Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">&amp;);</span>
  40. <span class="special">}}</span> <span class="comment">// namespaces</span>
  41. </pre>
  42. <h5>
  43. <a name="math_toolkit.ellint.heuman_lambda.h1"></a>
  44. <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>
  45. </h5>
  46. <p>
  47. This function evaluates the Heuman Lambda Function <span class="emphasis"><em>&#923;<sub>0</sub>(&#966;, k)</em></span>
  48. </p>
  49. <div class="blockquote"><blockquote class="blockquote"><p>
  50. <span class="inlinemediaobject"><img src="../../../equations/heuman_lambda.svg"></span>
  51. </p></blockquote></div>
  52. <p>
  53. 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
  54. type calculation rules</em></span></a> when the arguments are of different
  55. types: when they are the same type then the result is the same type as the
  56. arguments.
  57. </p>
  58. <p>
  59. Requires <span class="emphasis"><em>-1 &lt;= k &lt;= 1</em></span>, otherwise returns the result
  60. of <a class="link" href="../error_handling.html#math_toolkit.error_handling.domain_error">domain_error</a>
  61. (outside this range the result would be complex).
  62. </p>
  63. <p>
  64. The final <a class="link" href="../../policy.html" title="Chapter&#160;20.&#160;Policies: Controlling Precision, Error Handling etc">Policy</a> argument is optional and can
  65. be used to control the behaviour of the function: how it handles errors,
  66. what level of precision to use etc. Refer to the <a class="link" href="../../policy.html" title="Chapter&#160;20.&#160;Policies: Controlling Precision, Error Handling etc">policy
  67. documentation for more details</a>.
  68. </p>
  69. <p>
  70. Note that there is no complete analogue of this function (where &#966; = &#960; / 2) as
  71. this takes the value 1 for all <span class="emphasis"><em>k</em></span>.
  72. </p>
  73. <h5>
  74. <a name="math_toolkit.ellint.heuman_lambda.h2"></a>
  75. <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>
  76. </h5>
  77. <p>
  78. These functions are trivially computed in terms of other elliptic integrals
  79. and generally have very low error rates (a few epsilon) unless parameter
  80. &#966;
  81. is very large, in which case the usual trigonometric function argument-reduction
  82. issues apply.
  83. </p>
  84. <div class="table">
  85. <a name="math_toolkit.ellint.heuman_lambda.table_heuman_lambda"></a><p class="title"><b>Table&#160;8.69.&#160;Error rates for heuman_lambda</b></p>
  86. <div class="table-contents"><table class="table" summary="Error rates for heuman_lambda">
  87. <colgroup>
  88. <col>
  89. <col>
  90. <col>
  91. <col>
  92. <col>
  93. </colgroup>
  94. <thead><tr>
  95. <th>
  96. </th>
  97. <th>
  98. <p>
  99. GNU C++ version 7.1.0<br> linux<br> double
  100. </p>
  101. </th>
  102. <th>
  103. <p>
  104. GNU C++ version 7.1.0<br> linux<br> long double
  105. </p>
  106. </th>
  107. <th>
  108. <p>
  109. Sun compiler version 0x5150<br> Sun Solaris<br> long double
  110. </p>
  111. </th>
  112. <th>
  113. <p>
  114. Microsoft Visual C++ version 14.1<br> Win32<br> double
  115. </p>
  116. </th>
  117. </tr></thead>
  118. <tbody>
  119. <tr>
  120. <td>
  121. <p>
  122. Elliptic Integral Jacobi Zeta: Mathworld Data
  123. </p>
  124. </td>
  125. <td>
  126. <p>
  127. <span class="blue">Max = 0&#949; (Mean = 0&#949;)</span>
  128. </p>
  129. </td>
  130. <td>
  131. <p>
  132. <span class="blue">Max = 1.89&#949; (Mean = 0.887&#949;)</span>
  133. </p>
  134. </td>
  135. <td>
  136. <p>
  137. <span class="blue">Max = 1.89&#949; (Mean = 0.887&#949;)</span>
  138. </p>
  139. </td>
  140. <td>
  141. <p>
  142. <span class="blue">Max = 1.08&#949; (Mean = 0.734&#949;)</span>
  143. </p>
  144. </td>
  145. </tr>
  146. <tr>
  147. <td>
  148. <p>
  149. Elliptic Integral Heuman Lambda: Random Data
  150. </p>
  151. </td>
  152. <td>
  153. <p>
  154. <span class="blue">Max = 0&#949; (Mean = 0&#949;)</span>
  155. </p>
  156. </td>
  157. <td>
  158. <p>
  159. <span class="blue">Max = 3.82&#949; (Mean = 0.609&#949;)</span>
  160. </p>
  161. </td>
  162. <td>
  163. <p>
  164. <span class="blue">Max = 3.82&#949; (Mean = 0.608&#949;)</span>
  165. </p>
  166. </td>
  167. <td>
  168. <p>
  169. <span class="blue">Max = 2.12&#949; (Mean = 0.588&#949;)</span>
  170. </p>
  171. </td>
  172. </tr>
  173. </tbody>
  174. </table></div>
  175. </div>
  176. <br class="table-break"><h5>
  177. <a name="math_toolkit.ellint.heuman_lambda.h3"></a>
  178. <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>
  179. </h5>
  180. <p>
  181. The tests use a mixture of spot test values calculated using values calculated
  182. at <a href="http://www.wolframalpha.com/" target="_top">Wolfram Alpha</a>, and random
  183. test data generated using MPFR at 1000-bit precision and a deliberately naive
  184. implementation in terms of the Legendre integrals.
  185. </p>
  186. <h5>
  187. <a name="math_toolkit.ellint.heuman_lambda.h4"></a>
  188. <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>
  189. </h5>
  190. <p>
  191. The function is then implemented in terms of Carlson's integrals R<sub>J</sub> and R<sub>F</sub>
  192. using
  193. the relation:
  194. </p>
  195. <div class="blockquote"><blockquote class="blockquote"><p>
  196. <span class="inlinemediaobject"><img src="../../../equations/heuman_lambda.svg"></span>
  197. </p></blockquote></div>
  198. <p>
  199. This relation fails for <span class="emphasis"><em>|&#966;| &gt;= &#960;/2</em></span> in which case the
  200. definition in terms of the Jacobi Zeta is used.
  201. </p>
  202. </div>
  203. <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
  204. <td align="left"></td>
  205. <td align="right"><div class="copyright-footer">Copyright &#169; 2006-2019 Nikhar
  206. Agrawal, Anton Bikineev, Paul A. Bristow, Marco Guazzone, Christopher Kormanyos,
  207. Hubert Holin, Bruno Lalande, John Maddock, Jeremy Murphy, Matthew Pulver, Johan
  208. R&#229;de, Gautam Sewani, Benjamin Sobotta, Nicholas Thompson, Thijs van den Berg,
  209. Daryle Walker and Xiaogang Zhang<p>
  210. Distributed under the Boost Software License, Version 1.0. (See accompanying
  211. 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>)
  212. </p>
  213. </div></td>
  214. </tr></table>
  215. <hr>
  216. <div class="spirit-nav">
  217. <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>
  218. </div>
  219. </body>
  220. </html>