cc [ flags ] -I/usr/local/include file(s) -L/usr/local/lib -lmcw [ ... ] #include <mathcw.h> extern float zetaf (float); extern double zeta (double); extern long double zetal (long double); extern __float80 zetaw (__float80); extern __float128 zetaq (__float128); extern long_long_double zetall (long_long_double); extern decimal_float zetadf (decimal_float); extern decimal_double zetad (decimal_double); extern decimal_long_double zetadl (decimal_long_double); extern decimal_long_long_double zetadll (decimal_long_long_double);
NB: Functions with prototypes containing underscores in type names may be available only with certain extended compilers.
These values are defined by the relations
where p[k] is the k-th prime number. The first of these is a generalization of the sum of the harmonic series (the sequence of reciprocal integers) where the denominators are each raised to the power x.zeta(x) = sum(k = 1:Infinity) k**(-x) zeta(x) = product(k = 1:Infinity) (1 / (1 - p[k]**(-x)))
The product form means that the zeta function is important in number theory. Its generalization to complex arguments 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.
Some special values of the zeta function are
Here, k is a positive nonzero integer, and B[2k] is a Bernoulli number (see bernum(3CW)).zeta(-2k) = 0 zeta(1 -2k) = -B[2k] / (2k) zeta(0) = -1/2 zeta(1) = +Infinity zeta(2) = pi**2 / 6 zeta(4) = pi**4 / 90 zeta(6) = pi**6 / 945 zeta(8) = pi**8 / 9450 zeta(10) = pi**10 / 93555 zeta(2k) = (2 * pi)**(2k) |B[2k]| / (2 * (2k)!)
Whole-number arguments are special cases that are computed internally, and quickly, by a call to zetnum(3CW).