Author(s): G.A. Erskine | Library: MATHLIB |
Submitter: K.S. Kölbig | Submitted: 07.06.1992 |
Language: Fortran | Revised: |
Function subprograms RTHETA and DTHETA calculate the Jacobian theta functions
for real arguments x and . and are undefined if x is an integer; otherwise .
Note that several conflicting definitions of these functions occur in the literature. In particular, the argument in the trigonometric terms is often defined to be x instead of .
On CDC and Cray computers, the double-precision version DTHETA is not available.
Structure:
FUNCTION subprogram
User Entry Names: RTHETA, DTHETA
Files Referenced: Unit 6
External References: MTLMTR, ABEND
Usage:
In any arithmetic expression,
RTHETA(K,X,Q) or DTHETA(K,X,Q) has the value ,
Method:
If differs from x or -x by an integer, it follows from the periodicity and symmetry properties of the functions that and . In a region for which the approximation is sufficiently accurate, is set equal to the first (n=0) term of the transformed series
and is set equal to the first two (i.e. ) terms of
where . Otherwise the trigonometric series for and are used.
For all x, and are computed from , .
Restrictions:
1. .
2. .
3.
Error handling:
Error C349.1: Restriction 1 is not satisfied.
Error C349.2: Restriction 2 is not satisfied.
Error C349.3: Restriction 3 is not satisfied.
In all cases, the function value is set equal to zero, and a message
is written on Unit 6, unless subroutine MTLSET (N002)
has been called.
Accuracy:
For DTHETA (and for RTHETA on CDC and Cray computers), the error when Q is less than approximately 0.9 does not exceed two decimal digits in the last place. For larger values of Q (provided the computed result is non-zero), the error is at worst comparable in magnitude to the mathematical error which would be caused by one-bit rounding errors in the arguments X and Q.
On computers other than CDC and Cray, non-zero values of RTHETA have full machine accuracy.
Notes:
Successive references using the same value of Q are executed faster than those in which Q changes.
Many functional relations, including relations between the theta functions and the Jacobian elliptic functions, are given in Refs. 1-4.
References: