cc [ flags ] -I/usr/local/include file(s) -L/usr/local/lib -lmcw [ ... ] #include <mathcw.h> extern float zetaif (int n); extern double zetai (int n); extern long double zetail (int n); extern __float80 zetaiw (int n); extern __float128 zetaiq (int n); extern long_long_double zetaill (int n); extern decimal_float zetaidf (int n); extern decimal_double zetaid (int n); extern decimal_long_double zetaidl (int n); extern decimal_long_long_double zetaidll (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
zetai(n) = sum(k = 1:Infinity) k**(-n)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.
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 zetai(0) = -1/2 and zetai(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 zetai(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] zetai(n + 1) = (1 + zetai(n))/2 limit[n -> Infinity] (zetai(n + 1) - 1) = (zetai(n) - 1)/2
Because of the slowly-converging infinite sum and the leading digits 1.000..., their calculation requires high-precision arithmetic, which is why they are precomputed that way and then rounded and stored to machine precision in a compile-time internal table that records the small differences zetai(n) - 1.