jacobiTheta: Jacobi theta function In viscomplexr: Phase Portraits of Functions in the Complex Number Plane

Description

Approximation of "the" Jacobi theta function using the first nn factors in its triple product version

Usage

 1 jacobiTheta(z, tau, nn = 30L)

Arguments

 z Complex number; the point in the complex plane to which the output of the function is mapped tau Complex number; the so-called half-period ratio, must have a positive imaginary part nn Integer; number of factors to be used when approximating the triple product (default = 30)

Details

This function approximates the Jacobi theta function theta(z; tau) which is the sum of exp(pi*i*n^2*tau + 2*pi*i*n*z) for n in -Inf, Inf. It uses, however, the function's triple product representation. See https://en.wikipedia.org/wiki/Theta_function for details. This function has been implemented in C++, but it is only slightly faster than well-crafted R versions, because the calculation can be nicely vectorized in R.

Value

The value of the function for z and tau.