ELJAG 3CW "07 February 2010" "mathcw-1.00"

Table of contents


NAME

eljagf, eljag, eljagl, eljagw, eljagq, eljagll, eljagdf, eljagd, eljagdl, eljagdll - Jacobian elliptic function support routines

SYNOPSIS

cc [ flags ] -I/usr/local/include file(s) -L/usr/local/lib -lmcw [ ... ]

#include <mathcw.h>

extern float eljagf (float u, float k, int /* nabc */,
                     float aj[/* nabc */], float bj[/* nabc */],
                     float cj[/* nabc */], float phij[/* nabc */],
                     int *pneed);

extern double eljag (double u, double k, int /* nabc */,
                     double aj[/* nabc */], double bj[/* nabc */],
                     double cj[/* nabc */], double phij[/* nabc */],
                     int *pneed);

extern long double eljagl (long double u, long double k, int /* nabc */,
                          long double aj[/* nabc */], long double bj[/* nabc */],
                          long double cj[/* nabc */], long double phij[/* nabc */],
                          int *pneed);

extern __float80 eljagw (__float80 u, __float80 k, int /* nabc */,
                         __float80 aj[/* nabc */], __float80 bj[/* nabc */],
                         __float80 cj[/* nabc */], __float80 phij[/* nabc */],
                         int *pneed);

extern __float128 eljagq (__float128 u, __float128 k, int /* nabc */,
                          __float128 aj[/* nabc */], __float128 bj[/* nabc */],
                          __float128 cj[/* nabc */], __float128 phij[/* nabc */],
                          int *pneed);

extern long_long_double eljagll (long_long_double u, long_long_double k, int /* nabc */,
                                 long_long_double aj[/* nabc */], long_long_double bj[/* nabc */],
                                 long_long_double cj[/* nabc */], long_long_double phij[/* nabc */],
                                 int *pneed);

extern decimal_float eljagdf (decimal_float u, decimal_float k, int /* nabc */,
                              decimal_float aj[/* nabc */], decimal_float bj[/* nabc */],
                              decimal_float cj[/* nabc */], decimal_float phij[/* nabc */],
                              int *pneed);

extern decimal_double eljagd (decimal_double u, decimal_double k, int /* nabc */,
                              decimal_double aj[/* nabc */], decimal_double bj[/* nabc */],
                              decimal_double cj[/* nabc */], decimal_double phij[/* nabc */],
                              int *pneed);

extern decimal_long_double eljagdl (decimal_long_double u, decimal_long_double k, int /* nabc */,
                                    decimal_long_double aj[/* nabc */], decimal_long_double bj[/* nabc */],
                                    decimal_long_double cj[/* nabc */], decimal_long_double phij[/* nabc */],
                                    int *pneed);

extern decimal_long_long_double eljagdll (decimal_long_long_double u, decimal_long_long_double k, int /* nabc */,
                                          decimal_long_long_double aj[/* nabc */], decimal_long_long_double bj[/* nabc */],
                                          decimal_long_long_double cj[/* nabc */], decimal_long_long_double phij[/* nabc */],
                                          int *pneed);

NB: Functions with prototypes containing underscores in type names may be available only with certain extended compilers.


DESCRIPTION

From the starting values a, b, and c, use vagm to compute the arithmetic-geometric mean arrays aj[], bj[], and cj[], each containing at least nabc elements. Then compute the array of angles phij[] required for the Jacobian elliptic functions.

The argument u is unrestricted, but k is required to be in [-1,+1].

If pneed is not NULL, set the integer to which it points to the number of elements set, or needed, in the four arrays.

On return, if nset > nabc, then there was insufficient space in the arrays to compute the results.

Because the AGM algorithm is quadratically convergent, the number of elements needed in each array is small: 25 elements should suffice for precisions up to 70 decimal digits.

See M. Abramowitz & I. A. Stegun, Handbook of Mathematical Functions, Chapter 16, for definitions of the Jacobian elliptic, theta, and zeta functions.


RETURN VALUES

Return phij[0] as the function value.

ERRORS

If any argument is a NaN, return that argument. If k is out of range, set errno to EDOM and return a quiet NaN.

SEE ALSO

agm(3CW), eljam(3CW), eljanc(3CW), eljand(3CW), eljans(3CW), eljasc(3CW), eljasd(3CW), eljasn(3CW), eljcd(3CW), eljcn(3CW), eljcs(3CW), eljdc(3CW), eljdn(3CW), eljds(3CW), eljh(3CW), eljh4(3CW), eljnc(3CW), eljnd(3CW), eljns(3CW), eljsc(3CW), eljsd(3CW), eljsn(3CW), eljt(3CW), eljt1(3CW), eljt2(3CW), eljt3(3CW), eljt4(3CW), eljta(3CW), eljtd1(3CW), eljtd2(3CW), eljtd3(3CW), eljtd4(3CW), eljtda(3CW), eljz(3CW), elk(3CW), elkm1(3CW), elq(3CW), elq1p(3CW), elqc(3CW), elqc1p(3CW), vagm(3CW).