EJCN
This function evaluates the Jacobi elliptic function cn(x, m).
Function Return Value
EJCN — Real or complex function value. (Output)
Required Arguments
X — Real or complex argument for which the function value is desired. (Input)
AM — Parameter of the elliptic function (m = k2). (Input)
FORTRAN 90 Interface
Generic: EJCN (X, AM)
Specific: The specific interface names are S_EJCN, D_EJCN, C_EJCN, and Z_EJCN.
FORTRAN 77 Interface
Single: EJCN (X, AM)
Double: The double precision name is DEJCN.
Complex: The complex name is CEJCN.
Double Complex:    The double complex name is ZEJCN.
Description
The Jacobi elliptic function cn(x, m) = cos ɸ, where the amplitude ɸ is defined by the following:
The function cn(x, m) is computed by first applying, if necessary, a Jacobi transformation so that the parameter, m, is between zero and one. Then, a descending Landen (Gauss) transform is applied until the parameter is small. The small parameter approximation is then applied.
Comments
Informational errors
Type
Code
Description
3
2
The result is accurate to less than one half precision because X is too large.
3
2
The result is accurate to less than one half precision because REAL (Z) is too large.
3
3
The result is accurate to less than one half precision because AIMAG (Z) is too large.
3
5
Landen transform did not converge. Result may not be accurate. This should never occur.
Examples
Example 1
In this example, cn(1.5, 0.5) is computed and printed.
 
USE EJCN_INT
USE UMACH_INT
 
IMPLICIT NONE
! Declare variables
INTEGER NOUT
REAL AM, VALUE, X
! Compute
AM = 0.5
X = 1.5
VALUE = EJCN(X, AM)
! Print the results
CALL UMACH (2, NOUT)
WRITE (NOUT,99999) X, AM, VALUE
99999 FORMAT (' EJCN(', F6.3, ',', F6.3, ') = ', F6.3)
END
Output
 
EJCN( 1.500, 0.500) = 0.250
Example 2
In this example, cn(1.5 + 0.3i, 0.5) is computed and printed.
 
USE EJCN_INT
USE UMACH_INT
 
IMPLICIT NONE
! Declare variables
INTEGER NOUT
REAL AM
COMPLEX VALUE, Z
! Compute
Z = (1.5, 0.3)
AM = 0.5
VALUE = EJCN(Z, AM)
! Print the results
CALL UMACH (2, NOUT)
WRITE (NOUT,99999) Z, AM, VALUE
99999 FORMAT (' EJCN((', F6.3, ',', F6.3, '), ', F6.3, ') = (', &
F6.3, ',', F6.3, ')')
END
Output
 
EJCN(( 1.500, 0.300), 0.500) = ( 0.251,-0.212)
Published date: 03/19/2020
Last modified date: 03/19/2020