Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
898c3ad
Jacobi Theta functions
evanmiller Jul 7, 2020
c78dcd7
[CI SKIP] Jacobi theta: Add special-value tests and more
evanmiller Jul 7, 2020
10fc561
Jacobi theta: Test two more of Watson's identities [CI SKIP]
evanmiller Jul 7, 2020
4b6701d
Improve precision of Jacobi theta functions [CI SKIP]
evanmiller Jul 8, 2020
9c68c11
Jacobi theta: Make changes suggested in #394 [CI SKIP]
evanmiller Jul 8, 2020
aa382f5
Add quadrature tests to Jacobi theta functions [CI SKIP]
evanmiller Jul 8, 2020
45e8ab9
Test Jacobi thetas against elliptic functions and elliptic integrals …
evanmiller Jul 9, 2020
0d3bc43
Test Jacobi Thetas against their Laplace transforms [CI SKIP]
evanmiller Jul 9, 2020
c293d48
Add a note on using log1p with Jacobi theta functions [CI SKIP]
evanmiller Jul 9, 2020
6b8dd5a
Merge branch 'develop' into jacobi-theta [CI SKIP]
evanmiller Jul 9, 2020
08391cd
Add random data tests to Jacobi Theta functions [CI SKIP]
evanmiller Jul 9, 2020
d73472e
Add small-tau tests and simplify Jacobi Theta code [CI SKIP]
evanmiller Jul 10, 2020
78fc9e2
Merge branch 'develop' into jacobi-theta [CI SKIP]
evanmiller Jul 13, 2020
98bc16c
Merge branch 'develop' into jacobi-theta [CI SKIP]
evanmiller Jul 17, 2020
2ecdf32
Merge branch 'develop' into jacobi-theta [CI SKIP]
evanmiller Jul 23, 2020
32a4d73
Merge branch 'develop' into jacobi-theta [CI SKIP]
evanmiller Jul 27, 2020
a2499bb
Add user documentation for Jacobi Theta functions [CI SKIP]
evanmiller Jul 29, 2020
041ca09
Add function graphs to Jacobi Theta docs [CI SKIP]
evanmiller Jul 30, 2020
3a0e3f3
Define Jacobi Theta test tolerances [CI SKIP]
evanmiller Jul 31, 2020
4630855
Merge branch 'develop' into jacobi-theta [CI SKIP]
evanmiller Jul 31, 2020
cf7ff40
Add implementation note on Jacobi theta functions [CI SKIP]
evanmiller Jul 31, 2020
b116c75
Consolidate Jacobi Theta ULPs plotting programs [CI SKIP]
evanmiller Aug 1, 2020
9fab61b
Fix q domain checking of jacobi_theta4 [CI SKIP]
evanmiller Aug 1, 2020
fb8d3f3
Add ULPs plots to Jacobi Theta docs [CI SKIP]
evanmiller Aug 1, 2020
dd2fcd1
Add missing Jacobi Theta ULPs plots [CI SKIP]
evanmiller Aug 1, 2020
d629f80
Add LaTeX source for Jacobi Theta equations [CI SKIP]
evanmiller Aug 1, 2020
ef39393
Remove unused Jacobi Theta PNG equations [CI SKIP]
evanmiller Aug 1, 2020
7ecda0f
Add Jacobi Theta performance script [CI SKIP]
evanmiller Aug 2, 2020
8cea3e9
Remove vestigial eps*eps check from jacobi_theta3 [CI SKIP]
evanmiller Aug 2, 2020
2902061
Update Jacobi Theta docs per code review comments [CI SKIP]
evanmiller Aug 2, 2020
5bea1e5
Enable arg promotion for Jacobi Theta functions [CI SKIP]
evanmiller Aug 3, 2020
46c59f8
Fix Jacobi Theta plotting script [CI SKIP]
evanmiller Aug 3, 2020
c9ac3a6
Change Jacobi Theta convergence criterion [CI SKIP]
evanmiller Aug 4, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add ULPs plots to Jacobi Theta docs [CI SKIP]
Also add the built HTML files for easy evaluation. A full rebuild is
needed for the new docs to appear in the indexes.
  • Loading branch information
evanmiller committed Aug 1, 2020
commit fb8d3f3527342fad3f6dfd336d5be8afb5ae48f9
45 changes: 45 additions & 0 deletions doc/html/math_toolkit/jacobi_theta.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Jacobi Theta Functions</title>
<link rel="stylesheet" href="../math.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.2">
<link rel="home" href="../index.html" title="Math Toolkit 2.12.0">
<link rel="up" href="../special.html" title="Chapter 8. Special Functions">
<link rel="prev" href="jacobi/jacobi_sn.html" title="Jacobi Elliptic Function sn">
<link rel="next" href="jacobi_theta/jacobi_theta_overview.html" title="Overview of the Jacobi Theta 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/jacobi_sn.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../special.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_theta/jacobi_theta_overview.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="math_toolkit.jacobi_theta"></a><a class="link" href="jacobi_theta.html" title="Jacobi Theta Functions">Jacobi Theta Functions</a>
</h2></div></div></div>






</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"></div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="jacobi/jacobi_sn.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../special.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_theta/jacobi_theta_overview.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
158 changes: 158 additions & 0 deletions doc/html/math_toolkit/jacobi_theta/jacobi_theta1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Jacobi Theta Function θ1</title>
<link rel="stylesheet" href="../../math.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.2">
<link rel="home" href="../../index.html" title="Math Toolkit 2.12.0">
<link rel="up" href="../jacobi_theta.html" title="Jacobi Theta Functions">
<link rel="prev" href="jacobi_theta_overview.html" title="Overview of the Jacobi Theta Functions">
<link rel="next" href="jacobi_theta2.html" title="Jacobi Theta Function θ2">
</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_theta_overview.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../jacobi_theta.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_theta2.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.jacobi_theta.jacobi_theta1"></a><a class="link" href="jacobi_theta1.html" title="Jacobi Theta Function θ1">Jacobi Theta
Function θ<sub>1</sub></a>
</h3></div></div></div>

<h5>
<a name="math_toolkit.jacobi_theta.jacobi_theta1.h0"></a>
<span class="phrase"><a name="math_toolkit.jacobi_theta.jacobi_theta1.synopsis"></a></span><a class="link" href="jacobi_theta1.html#math_toolkit.jacobi_theta.jacobi_theta1.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">jacobi_theta</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">T</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">jacobi_theta1</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">q</span><span class="special">);</span>

<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Policy</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">jacobi_theta1</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">q</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Policy</span><span class="special">&amp;);</span>

<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</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">jacobi_theta1tau</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">tau</span><span class="special">);</span>

<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Policy</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">jacobi_theta1tau</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">tau</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Policy</span><span class="special">&amp;);</span>
<span class="special">}}</span> <span class="comment">// namespaces</span>
</pre>
<h5>
<a name="math_toolkit.jacobi_theta.jacobi_theta1.h1"></a>
<span class="phrase"><a name="math_toolkit.jacobi_theta.jacobi_theta1.description"></a></span><a class="link" href="jacobi_theta1.html#math_toolkit.jacobi_theta.jacobi_theta1.description">Description</a>
</h5>
<p>
The functions calculate the value of first <a class="link" href="jacobi_theta_overview.html" title="Overview of the Jacobi Theta Functions">Jacobi
Theta function</a>, parameterized either in terms of the nome <span class="emphasis"><em>q</em></span>:
</p>
<div class="blockquote"><blockquote class="blockquote">
<p>
<span class="inlinemediaobject"><img src="../../../equations/jacobi_theta1.svg"></span>

</p>
</blockquote></div>
<p>
Or in terms of an imaginary τ:
</p>
<div class="blockquote"><blockquote class="blockquote">
<p>
<span class="inlinemediaobject"><img src="../../../equations/jacobi_theta1tau.svg"></span>

</p>
</blockquote></div>
<p>
The nome <span class="emphasis"><em>q</em></span> is restricted to the domain (0, 1), returning
the result of <a class="link" href="../error_handling.html#math_toolkit.error_handling.domain_error">domain_error</a>
otherwise. The following graph shows the theta function at various values
of <span class="emphasis"><em>q</em></span>:
</p>
<div class="blockquote"><blockquote class="blockquote">
<p>
<span class="inlinemediaobject"><img src="../../../graphs/jacobi_theta1.svg" align="middle"></span>

</p>
</blockquote></div>
<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>
<h5>
<a name="math_toolkit.jacobi_theta.jacobi_theta1.h2"></a>
<span class="phrase"><a name="math_toolkit.jacobi_theta.jacobi_theta1.accuracy"></a></span><a class="link" href="jacobi_theta1.html#math_toolkit.jacobi_theta.jacobi_theta1.accuracy">Accuracy</a>
</h5>
<p>
The following <a class="link" href="../ulps_plots.html" title="ULPs Plots">ULPs plot</a> is
representative, fixing <span class="emphasis"><em>q</em></span>=0.5 and varying <span class="emphasis"><em>x</em></span>
from 0 to 2π:
</p>
<div class="blockquote"><blockquote class="blockquote">
<p>
<span class="inlinemediaobject"><img src="../../../graphs/jacobi_theta1_float.svg" align="middle"></span>

</p>
</blockquote></div>
<p>
The envelope represents the function's <a class="link" href="../cond.html" title="Condition Numbers">condition
number</a>. Note that relative accuracy degenerates periodically near
θ<sub>1</sub>=0.
</p>
<p>
Fixing <span class="emphasis"><em>x</em></span>=5 and varying <span class="emphasis"><em>q</em></span>, the ULPs
plot looks like:
</p>
<div class="blockquote"><blockquote class="blockquote">
<p>
<span class="inlinemediaobject"><img src="../../../graphs/jacobi_theta1q_float.svg" align="middle"></span>

</p>
</blockquote></div>
<p>
Accuracy tends to degenerate near <span class="emphasis"><em>q</em></span>=1 (small τ).
</p>
<h5>
<a name="math_toolkit.jacobi_theta.jacobi_theta1.h3"></a>
<span class="phrase"><a name="math_toolkit.jacobi_theta.jacobi_theta1.implementation"></a></span><a class="link" href="jacobi_theta1.html#math_toolkit.jacobi_theta.jacobi_theta1.implementation">Implementation</a>
</h5>
<p>
The <span class="emphasis"><em>q</em></span> parameterization is implemented using the τ parameterization,
where τ=-log(<span class="emphasis"><em>q</em></span>)/π.
</p>
<p>
If τ is greater than or equal to 1, the summation above is used as-is. However
if τ &lt; 1, the following identity <a class="ulink" href="https://dlmf.nist.gov/20.7#viii" target="_top">DLMF
20.7.30</a> is used, defining τ'=-1/τ:
</p>
<div class="blockquote"><blockquote class="blockquote">
<p>
<span class="inlinemediaobject"><img src="../../../equations/jacobi_theta1_imaginary.svg"></span>

</p>
</blockquote></div>
<p>
This transformation of variables ensures that the function will always converge
in a small number of iterations.
</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"></div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="jacobi_theta_overview.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../jacobi_theta.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_theta2.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Loading