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 implementation note on Jacobi theta functions [CI SKIP]
  • Loading branch information
evanmiller committed Jul 31, 2020
commit cf7ff4099f46f2ff0520c4fe18ff87eda8a55b2f
Binary file added doc/equations/jacobi_theta1_imaginary.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions doc/equations/jacobi_theta1_imaginary.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/equations/jacobi_theta2_imaginary.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions doc/equations/jacobi_theta2_imaginary.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/equations/jacobi_theta3_imaginary.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions doc/equations/jacobi_theta3_imaginary.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/equations/jacobi_theta4_imaginary.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions doc/equations/jacobi_theta4_imaginary.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 46 additions & 0 deletions doc/sf/jacobi_theta.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ Most applications will want to use the /q/ parameterization of the functions: `_

Note that Boost assumes that [tau] is a purely imaginary number. This assumption is not required by the mathematics, but it does cover the most common application domains.

[heading Accuracy considerations]

The purpose of the [tau] parameterization is to provide increased accuracy either when /q/ is expressible as an exponential or is very close to unity. For example, instead of:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't put semicolons before equations; the mathematics is part of the sentence.


jacobi_theta1(x, exp(-a));
Expand All @@ -54,6 +56,10 @@ It is more accurate to use `__log1p` and pass in the result to the [tau] version

Additional "minus 1" versions of the third and fourth theta functions are provided. Similar in spirit to `__expm1`, these functions return one less than the evaluated function, and yield increased accuracy when /q/ is small.

[heading Tests]

Results of the theta functions are tested against Wolfram Alpha data, as well as random values computed at high precision. In addition, the tests verify the majority of the identities described in [@https://dlmf.nist.gov/20.7 DLMF Chapter 20.7].

[endsect] [/section:jacobi_theta_overview Overview of the Jacobi Theta Functions]

[section:jacobi_theta1 Jacobi Theta Function [theta][sub 1]]
Expand Down Expand Up @@ -94,6 +100,16 @@ The nome /q/ is restricted to the domain (0, 1). The following graph shows the t

[optional_policy]

[heading Implementation]

The /q/ parameterization is implemented using the [tau] parameterization, where [tau]=-log(/q/)/[pi].

If [tau] is greater than or equal to 1, the summation in the section above is used as-is. However if [tau] < 1, the following identity [@https://dlmf.nist.gov/20.7#viii DLMF 20.7.30] is used, defining [tau]'=-1/[tau]:

[equation jacobi_theta1_imaginary]

This transformation of variables ensures that the function will always converge in a small number of iterations.

[endsect] [/section:jacobi_theta1 Jacobi Theta Function [theta][sub 1]]

[section:jacobi_theta2 Jacobi Theta Function [theta][sub 2]]
Expand Down Expand Up @@ -134,6 +150,16 @@ The nome /q/ is restricted to the domain (0, 1). The following graph shows the t

[optional_policy]

[heading Implementation]

The /q/ parameterization is implemented using the [tau] parameterization, where [tau]=-log(/q/)/[pi].

If [tau] is greater than or equal to 1, the summation in the section above is used as-is. However if [tau] < 1, the following identity [@https://dlmf.nist.gov/20.7#viii DLMF 20.7.31] is used, defining [tau]'=-1/[tau]:

[equation jacobi_theta2_imaginary]

This transformation of variables ensures that the function will always converge in a small number of iterations.

[endsect] [/section:jacobi_theta2 Jacobi Theta Function [theta][sub 2]]

[section:jacobi_theta3 Jacobi Theta Function [theta][sub 3]]
Expand Down Expand Up @@ -188,6 +214,16 @@ The nome /q/ is restricted to the domain (0, 1). The following graph shows the t

A second quartet of functions (functions containing `m1`) compute one less than the value of the third theta function. These versions of the functions provide increased accuracy when the result is close to unity.

[heading Implementation]

The /q/ parameterization is implemented using the [tau] parameterization, where [tau]=-log(/q/)/[pi].

If [tau] is greater than or equal to 1, the summation in the section above is used as-is. However if [tau] < 1, the following identity [@https://dlmf.nist.gov/20.7#viii DLMF 20.7.32] is used, defining [tau]'=-1/[tau]:

[equation jacobi_theta3_imaginary]

This transformation of variables ensures that the function will always converge in a small number of iterations.

[endsect] [/section:jacobi_theta3 Jacobi Theta Function [theta][sub 3]]

[section:jacobi_theta4 Jacobi Theta Function [theta][sub 4]]
Expand Down Expand Up @@ -242,6 +278,16 @@ The nome /q/ is restricted to the domain (0, 1). The following graph shows the t

A second quartet of functions (functions containing `m1`) compute one less than the value of the fourth theta function. These versions of the functions provide increased accuracy when the result is close to unity.

[heading Implementation]

The /q/ parameterization is implemented using the [tau] parameterization, where [tau]=-log(/q/)/[pi].

If [tau] is greater than or equal to 1, the summation in the section above is used as-is. However if [tau] < 1, the following identity [@https://dlmf.nist.gov/20.7#viii DLMF 20.7.33] is used, defining [tau]'=-1/[tau]:

[equation jacobi_theta4_imaginary]

This transformation of variables ensures that the function will always converge in a small number of iterations.

[endsect] [/section:jacobi_theta4 Jacobi Theta Function [theta][sub 4]]

[endsect] [/section:jacobi_theta Jacobi Theta Functions]