# §20.14 Methods of Computation

The Fourier series of §20.2(i) usually converge rapidly because of the factors $q^{(n+\frac{1}{2})^{2}}$ or $q^{n^{2}}$, and provide a convenient way of calculating values of $\mathop{\theta_{j}\/}\nolimits\!\left(z\middle|\tau\right)$. Similarly, their $z$-differentiated forms provide a convenient way of calculating the corresponding derivatives. For instance, the first three terms of (20.2.1) give the value of $\mathop{\theta_{1}\/}\nolimits\!\left(2-i\middle|i\right)$ ($=\mathop{\theta_{1}\/}\nolimits\!\left(2-i,e^{-\pi}\right)$) to 12 decimal places.

For values of $\left|q\right|$ near $1$ the transformations of §20.7(viii) can be used to replace $\tau$ with a value that has a larger imaginary part and hence a smaller value of $\left|q\right|$. For instance, to find $\mathop{\theta_{3}\/}\nolimits\!\left(z,0.9\right)$ we use (20.7.32) with $q=0.9=e^{i\pi\tau}$, $\tau=-i\mathop{\ln\/}\nolimits\!\left(0.9\right)/\pi$. Then $\tau^{\prime}=-1/\tau=-i\pi/\mathop{\ln\/}\nolimits\!\left(0.9\right)$ and $q^{\prime}=e^{i\pi\tau^{\prime}}=\mathop{\exp\/}\nolimits\!\left(\pi^{2}/% \mathop{\ln\/}\nolimits\!\left(0.9\right)\right)=(2.07\dots)\times 10^{-41}$. Hence the first term of the series (20.2.3) for $\mathop{\theta_{3}\/}\nolimits\!\left(z\tau^{\prime}\middle|\tau^{\prime}\right)$ suffices for most purposes. In theory, starting from any value of $\tau$, a finite number of applications of the transformations $\tau\to\tau+1$ and $\tau\to-1/\tau$ will result in a value of $\tau$ with $\Im{\tau}\geq\sqrt{3}/2$; see §23.18. In practice a value with, say, $\Im{\tau}\geq 1/2$, $\left|q\right|\leq 0.2$, is found quickly and is satisfactory for numerical evaluation.