EJSN
This function evaluates the Jacobi elliptic function sn(x, m).
Function Return Value
EJSN — 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: EJSN (X, AM)
Specific: The specific interface names are S_EJSN, D_EJSN, C_EJSN, and Z_EJSN
FORTRAN 77 Interface
Single: EJSN (X, AM)
Double: The double precision name is DEJSN.
Complex: The complex name is CEJSN.
Double Complex:     The double complex name is ZEJSN.
Description
The Jacobi elliptic function sn(x, m) = sin ɸ, where the amplitude ɸ is defined by the following:
The function sn(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, sn(1.5, 0.5) is computed and printed.
 
USE EJSN_INT
USE UMACH_INT
 
IMPLICIT NONE
! Declare variables
INTEGER NOUT
REAL AM, VALUE, X
! Compute
AM = 0.5
X = 1.5
VALUE = EJSN(X, AM)
! Print the results
CALL UMACH (2, NOUT)
WRITE (NOUT,99999) X, AM, VALUE
99999 FORMAT (' EJSN(', F6.3, ',', F6.3, ') = ', F6.3)
END
Output
 
EJSN( 1.500, 0.500) = 0.968
Example 2
In this example, sn(1.5 + 0.3i, 0.5) is computed and printed.
 
USE EJSN_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 = EJSN(Z, AM)
! Print the results
CALL UMACH (2, NOUT)
WRITE (NOUT,99999) Z, AM, VALUE
99999 FORMAT (' EJSN((', F6.3, ',', F6.3, '), ', F6.3, ') = (', &
F6.3, ',', F6.3, ')')
END
Output
 
EJSN(( 1.500, 0.300), 0.500) = ( 0.993, 0.054)