s21ca evaluates the Jacobian elliptic functions sn, cn and dn.
Syntax
C# |
---|
public static void s21ca( double u, double m, out double sn, out double cn, out double dn, out int ifail ) |
Visual Basic |
---|
Public Shared Sub s21ca ( _ u As Double, _ m As Double, _ <OutAttribute> ByRef sn As Double, _ <OutAttribute> ByRef cn As Double, _ <OutAttribute> ByRef dn As Double, _ <OutAttribute> ByRef ifail As Integer _ ) |
Visual C++ |
---|
public: static void s21ca( double u, double m, [OutAttribute] double% sn, [OutAttribute] double% cn, [OutAttribute] double% dn, [OutAttribute] int% ifail ) |
F# |
---|
static member s21ca : u : float * m : float * sn : float byref * cn : float byref * dn : float byref * ifail : int byref -> unit |
Parameters
- u
- Type: System..::..DoubleOn entry: the argument and the parameter of the functions, respectively.Constraints:
- , where ;
- if , .
- m
- Type: System..::..DoubleOn entry: the argument and the parameter of the functions, respectively.Constraints:
- , where ;
- if , .
- sn
- Type: System..::..Double%On exit: the values of the functions , and , respectively.
- cn
- Type: System..::..Double%On exit: the values of the functions , and , respectively.
- dn
- Type: System..::..Double%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
s21ca evaluates the Jacobian elliptic functions of argument and parameter ,
where , called the amplitude of , is defined by the integral
The elliptic functions are sometimes written simply as , and , avoiding explicit reference to the parameter .
Another nine elliptic functions may be computed via the formulae
(see Abramowitz and Stegun (1972)).
s21ca is based on a procedure given by Bulirsch (1960), and uses the process of the arithmetic-geometric mean (16.9 in Abramowitz and Stegun (1972)). Constraints are placed on the values of and in order to avoid the possibility of machine overflow.
References
Abramowitz M and Stegun I A (1972) Handbook of Mathematical Functions (3rd Edition) Dover Publications
Bulirsch R (1960) Numerical calculation of elliptic integrals and elliptic functions Numer. Math. 7 76–90
Error Indicators and Warnings
Errors or warnings detected by the method:
On entry, , where .
On entry, and .
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
None.
Example
This example reads values of the argument and parameter from a file, evaluates the function and prints the results.
Example program (C#): s21cae.cs