cc [ flags ] -I/usr/local/include file(s) -L/usr/local/lib -lmcw [ ... ] #include <mathcw.h> extern float ellrgf (float x, float y, float z); extern double ellrg (double x, double y, double z); extern long double ellrgl (long double x, long double y, long double z); extern __float80 ellrgw (__float80 x, __float80 y, __float80 z); extern __float128 ellrgq (__float128 x, __float128 y, __float128 z); extern long_long_double ellrgll (long_long_double x, long_long_double y, long_long_double z); extern decimal_float ellrgdf (decimal_float x, decimal_float y, decimal_float z); extern decimal_double ellrgd (decimal_double x, decimal_double y, decimal_double z); extern decimal_long_double ellrgdl (decimal_long_double x, decimal_long_double y, decimal_long_double z); extern decimal_long_long_double ellrgdll (decimal_long_long_double x, decimal_long_long_double y, decimal_long_long_double z);
NB: Functions with prototypes containing underscores in type names may be available only with certain extended compilers.
where x >= 0, y > 0, and z > 0.ellrg(x, y, z) = R(-1/2; 1/2, 1/2, 1/2; x, y, z) = (1/4) * integral(t=0:Infinity) (t + x)**(-1/2) * (t + y)**(-1/2) * (t + z)**(-1/2) * (x / (t + x) + y / (t + y) + z / (t + z)) * t dt = z * ellrf(x, y, z) - (1/3) * (x - z) * (y - z) * ellrd(x, y, z) + sqrt(x * y / z)
The function is symmetric in x, y, and z.
In the third form involving ellrf() and ellrd(), symmetry is used to prevent a zero denominator from z == 0.
The normalization condition satisfied is
ellrg(x, x, x) = x**(1/2).