cc [ flags ] -I/usr/local/include file(s) -L/usr/local/lib -lmcw [ ... ] #include <mathcw.h> extern float ellknf (float q); extern double ellkn (double q); extern long double ellknl (long double q); extern __float80 ellknw (__float80 q); extern __float128 ellknq (__float128 q); extern long_long_double ellknll (long_long_double q); extern decimal_float ellkndf (decimal_float q); extern decimal_double ellknd (decimal_double q); extern decimal_long_double ellkndl (decimal_long_double q); extern decimal_long_long_double ellkndll (decimal_long_long_double q);
NB: Functions with prototypes containing underscores in type names may be available only with certain extended compilers.
ellkn(q) = integral(t=0:pi/2) (1 / sqrt(1 - k**2 * sin(t)**2)) dtwhere k is in [-1,+1], and the nome q is in [0,1].
Use this function in preference to ellk(3CW) when q is the given nome, and the modulus k is derived from it.
Equivalents in other systems are:
Abramowitz & Stegun NBS Handbook #55: K(m) = ellk(sqrt(m)) Mathematica: EllipticK[m] = ellk(sqrt(m)) Maple: EllipticK(k) = ellk(k)