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

Table of contents


NAME

zetnum - n-th Riemann zeta number

SYNOPSIS

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.


DESCRIPTION

Determine the n-th Riemann zeta number, zeta[n], by fast table lookup, where n >= 0.

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

RETURN VALUES

Return the n-th Riemann zeta number.

ERRORS

If n = 1, set errno to ERANGE and return +Infinity, since that case corresponds to the divergent harmonic series.

SEE ALSO

bernum(3CW), betnm1(3CW), betnum(3CW), eulnum(3CW), fibnum(3CW), zeta(3CW), zetam1(3CW), zetnm1(3CW).