cc [ flags ] -I/usr/local/include file(s) -L/usr/local/lib -lmcw [ ... ] #include <mathcw.h> extern float zetnumf (int n); extern double zetnum (int n); extern long double zetnuml (int n); extern __float80 zetnumw (int n); extern __float128 zetnumq (int n); extern long_long_double zetnumll (int n); extern decimal_float zetnumdf (int n); extern decimal_double zetnumd (int n); extern decimal_long_double zetnumdl (int n); extern decimal_long_long_double zetnumdll (int n);
NB: Functions with prototypes containing underscores in type names may be available only with certain extended compilers.
These numbers are defined by the relation
zetnum(n) = sum(k = 1:Infinity) k**(-n) [where n > 1]This is a simple generalization of the sum of the harmonic series (the sequence of reciprocal integers) where the denominators are each raised to the power n.
For n < 2, a reflection formula extends the definition onto [0,1] and the negative axis.
The zeta numbers are important in number theory. Their generalization to real numbers (see zeta(3CW)) and complex numbers leads to the greatest unsolved problem in modern mathematics, the famous Riemann hypothesis that the zeros of the complex zeta function all have a real part of +1/2.
Special values of the zeta numbers are zetnum(0) = -1/2 and zetnum(1) = +Infinity.
For larger indexes, the numbers have modest values that form the approximate sequence 1.644934, 1.202057, 1.082323, 1.036928, 1.017343, 1.008349, 1.004077, 1.002008, ... For n > 1, the numbers soon approach the approximate limiting value zetnum(n) = 1 + 2**(-n), corresponding to the first two terms of its defining series. That is not the true limit, but it suffices for finite-precision floating-point arithmetic. Other statements of the limiting behavior are
limit[n -> Infinity] zetnum(n + 1) = (1 + zetnum(n))/2 limit[n -> Infinity] (zetnum(n + 1) - 1) = (zetnum(n) - 1)/2