s21cb evaluates the Jacobian elliptic functions ,
and for a complex argument .
Syntax
C# |
---|
public static void s21cb( Complex z, double ak2, out Complex sn, out Complex cn, out Complex dn, out int ifail ) |
Visual Basic |
---|
Public Shared Sub s21cb ( _ z As Complex, _ ak2 As Double, _ <OutAttribute> ByRef sn As Complex, _ <OutAttribute> ByRef cn As Complex, _ <OutAttribute> ByRef dn As Complex, _ <OutAttribute> ByRef ifail As Integer _ ) |
Visual C++ |
---|
public: static void s21cb( Complex z, double ak2, [OutAttribute] Complex% sn, [OutAttribute] Complex% cn, [OutAttribute] Complex% dn, [OutAttribute] int% ifail ) |
F# |
---|
static member s21cb : z : Complex * ak2 : float * sn : Complex byref * cn : Complex byref * dn : Complex byref * ifail : int byref -> unit |
Parameters
- z
- Type: NagLibrary..::..ComplexOn entry: the argument of the functions.Constraints:
- ;
- , where .
- ak2
- Type: System..::..DoubleOn entry: the value of .Constraint: .
- sn
- Type: NagLibrary..::..Complex%On exit: the values of the functions , and , respectively.
- cn
- Type: NagLibrary..::..Complex%On exit: the values of the functions , and , respectively.
- dn
- Type: NagLibrary..::..Complex%On exit: the values of the functions , and , respectively.
- ifail
- Type: System..::..Int32%On exit: unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).
Description
s21cb evaluates the Jacobian elliptic functions , and given by
where is a complex argument, is a real parameter (the modulus) with and (the amplitude of ) is defined by the integral
The above definitions can be extended for values of (see Salzer (1962)) by means of the formulae
where .
Special values include
These functions are often simply written as , and , thereby avoiding explicit reference to the parameter . They can also be expressed in terms of Jacobian theta functions (see s21cc).
Another nine elliptic functions may be computed via the formulae
(see Abramowitz and Stegun (1972)).
The values of , and are obtained by calls to s21ca. Further details can be found in [Further Comments].
References
Abramowitz M and Stegun I A (1972) Handbook of Mathematical Functions (3rd Edition) Dover Publications
Salzer H E (1962) Quick calculation of Jacobian elliptic functions Comm. ACM 5 399
Error Indicators and Warnings
Errors or warnings detected by the method:
On entry, , or , or , or , where .
Accuracy
In principle the method is capable of achieving full relative precision in the computed values. However, the accuracy obtainable in practice depends on the accuracy of the standard elementary functions such as SIN and COS.
Parallelism and Performance
None.
Further Comments
The values of , and are computed via the formulae
where and (the complementary modulus).
Example
This example evaluates , and at when , and prints the results.
Example program (C#): s21cbe.cs