ZETAM1 3CW "11 December 2009" "mathcw-1.00"

Table of contents


NAME

zetam1 - Riemann zeta function, less 1

SYNOPSIS

cc [ flags ] -I/usr/local/include file(s) -L/usr/local/lib -lmcw [ ... ]

#include <mathcw.h>

extern float zetam1f (float);

extern double zetam1 (double);

extern long double zetam1l (long double);

extern __float80 zetam1w (__float80);

extern __float128 zetam1q (__float128);

extern long_long_double zetam1ll (long_long_double);

extern decimal_float zetam1df (decimal_float);

extern decimal_double zetam1d (decimal_double);

extern decimal_long_double zetam1dl (decimal_long_double);

extern decimal_long_long_double zetam1dll (decimal_long_long_double);

NB: Functions with prototypes containing underscores in type names may be available only with certain extended compilers.


DESCRIPTION

Determine the value of the Riemann zeta function, less 1: zeta(x) - 1.

The zeta function is defined by the relations

zeta(x) = sum(k = 1:Infinity) k**(-x)
zeta(x) = product(k = 1:Infinity) (1 / (1 - p[k]**(-x)))
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.

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.

For large positive x, the zeta function is close to one, because the series terms fall off quickly, making the function value close to the sum of the first two terms, 1 + 2**(-x). A separate function zetam1(x) that accurately computes the difference avoids accuracy loss, and allows recovery of correctly-rounded zeta function values, at least for x >> 1.

Some special values of the zeta function are

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)!)
Here, k is a positive nonzero integer, and B[2k] is a Bernoulli number (see bernum(3CW)).

Whole-number arguments are special cases that are computed internally, and quickly, by a call to zetnum(3CW).


RETURN VALUES

Return the Riemann zeta function value, less 1.

ERRORS

None.

SEE ALSO

bernum(3CW), beta(3CW), betam1(3CW), betnm1(3CW), betnum(3CW), eulnum(3CW), fibnum(3CW), zeta(3CW), zetnm1(3CW), zetnum(3CW).