I have forgotten
my Password

Or login with:

  • Facebookhttp://facebook.com/
  • Googlehttps://www.google.com/accounts/o8/id
  • Yahoohttps://me.yahoo.com
MathsSpecial

Zeta

Evaluates the Riemann Zeta function.
Controller: CodeCogs

Private project under development, to help contact the author: Contact Controller

Interface

C++

Zeta

 
doublezetadoublep )
This component estimates the Riemann Zeta function, which is defined by the series

A graph for various values of the argument is displayed below.

MISSING IMAGE!

1/maths_special_zeta.png cannot be found in /users/1/maths_special_zeta.png. Please contact the submission author.

For integral values of p up to 20, a precomputed value of the function is returned, otherwise the infinite sum is used to approximate the result. In the following example, arguments from the [3, 4] interval are used, with step equal to 0.2, to evaluate the Zeta function.

Reference

John Burkardt's library of statistical C++ routines, http://www.csit.fsu.edu/~burkardt/cpp_src/prob/prob.html

Example 1

#include <codecogs/maths/special/zeta.h>
#include <iostream>
#include <iomanip>
 
int main()
{
  std::cout << std::setprecision(10);
  for (double x = 3; x < 5; x += 0.2)
  {
    std::cout << "Zeta(" << x << ") = ";
    std::cout << Maths::Special::zeta(x) << std::endl;
  }
  return 0;
}
Output
Zeta(3) = 1.202056903
Zeta(3.2) = 1.166773371
Zeta(3.4) = 1.138663776
Zeta(3.6) = 1.115989079
Zeta(3.8) = 1.097510576
Zeta(4) = 1.082323234
Zeta(4.2) = 1.069751477
Zeta(4.4) = 1.059281726
Zeta(4.6) = 1.050517383
Zeta(4.8) = 1.043148013

Parameters

pthe power to which the fractions are raised

Returns

An approximation of the Riemann Zeta function with the given parameter.

Authors

Lucian Bentea (September 2005)
Source Code

This module is private, for owner's use only.

Not a member, then Register with CodeCogs. Already a Member, then Login.