Programming details on the computation of the Riemann zeta function using Aribas

In summary, we discussed the definition of the Riemann zeta function and its relation to the Dirichlet eta function. We also looked at the Euler transformation of the Dirichlet eta and how it can be used to calculate the Riemann zeta function. We then discussed the use of the programming language Aribas to implement complex arithmetic and calculate the Dirichlet eta function and Riemann zeta function. Finally, we compared the results of our calculations to the built-in zeta function in PARI/GP.
  • #1
RamaWolf
95
2
(1) Let s be a complex number like s = a + b i, then we define [tex] \zeta(s) = \sum_{n=1}^{\infty} \frac{1}{n^s} [/tex]

Our aim:

to compute ζ([itex]\frac{1}{2}[/itex]+14.1347 i) with the help of the programming language Aribas

(2) Web Links

Aribas: http://www.mathematik.uni-muenchen.de/~forster/sw/aribas.html

Dirichlet eta: http://en.wikipedia.org/wiki/Dirichlet_eta_function

Euler transformation of alterning series: http://en.wikipedia.org/wiki/Euler_transform

(3) Books: Knopp: Theorie und Anwendung der unendlichen Reihen; Henrici: Applied
and Computational Complex Analsis; Derbyshire: Prime Obsession

(4) Basics: The Riemann zeta in (1) is defined only for s.Re > 1 (i.e. the real part of s);
we use the 'alternating zeta' or Dirichlet eta defined as

[tex] \eta(s) = \sum_{n=1}^{\infty} \frac{(-1)^{n-1}}{n^s} [/tex]

defined for s.Re > 0

The Riemann zeta and the Dirichlet eta are related through:

ζ(s) := [itex]η(s) / (1-2^{1-s}[/itex])

With the Euler transformation of the Dirichlet eta, the Riemann zeta looks like:

[tex]\zeta(s)=\frac{1}{1-2^{1-s}}
\sum_{n=0}^\infty \frac {1}{2^{n+1}}
\sum_{k=0}^n (-1)^k {n \choose k} (k+1)^{-s} [/tex]


To be continued with the programming details
 
Physics news on Phys.org
  • #2
Aribas is a computer program for number theoretical calculations.
It comes with:
- a built-in large integer arithmetic
- several modes for floating-point accuray; single/double/long (32/64/128 bit) and user-defined bit number
- a bunch of number theoretical functions
- a great variety of example program scripts
- the possibility to easy implement additional user-written functions

For the Riemann zeta calculations, we have to implement a complex arithmetic,
which is easily done by a handfull of functions; we need especially;

AddC(a,b) to add two complex variables, SubC(a,b), AbsC(a), which
can be programmed at a very basic programming level.

A little bit more is needed for a function to calculate the
exponentiation of a real base raised to a complex exponent.

As an example, here is the Aribas code for 'PowRC':
(a complex variable c is stored in an array[2] of reals,
the Re part in c[0], the Im part in c[1])

Code:
function PowRC(b: real; a:complex): complex;
var
   c: complex;
   x,y: real;
begin 
   x:=log(b);
   y:=x*a[1];
   x:=exp(a[0]*x);
   c[0]:=x*cos(y);
   c[1]:=x*sin(y); 
   return(c);
end.

To be continued with the further programming details
 
  • #3
Code:
Deta(x,n)={
	my(b=2^(2*n-1), c=b, s=0);
	forstep(k=n-1,0,-1,
		s += c*(-1)^(k)/((k+1)^x);
		b *= ((2*k+1)*(k+1)) / (2*(n+k)*(n-k));
		c += b;
	);
	return(s/c);
}
Rzeta(s,n=100)=Deta(s,n)/(1-2^(1-s))
 
  • #4
Aribas code for the Dirichlet eta function:

Code:
   i:=1; t:=(0.0,0.0);
   for n:=0 to 9999 do
      i:=i*2;      
      x:=(0.0,0.0);
      for k:=0 to n do
         y:=PowRC(1.0/(1.0+k),s);
         j:=nCr(n,k); 
         y:=j*y; 
         if odd(k) then
            x:=SubC(x,y);
         else
            x:=AddC(x,y);
         end;
      end;
      x:=x/i;
      t:=AddC(t,x);
      if AbsC(x) < eps then
         [B]break[/B];
      end;
   end;
   return(t);


The for loop will terminate after 9999 iterrations, but in practice, the break
will be effective miuch earlier

[tex]{n \choose r}[/tex] the binomial coefficient is computed with the function 'nCr' ("from n choose r")

Numerical results for s = [itex]\frac{1}{2}[/itex]+14.1347 I

eps = 1.00000000000000000e-13

eta2: -0.000002874863 - 0.000047246855 I

factor: 0.411257843979 + 0.091385435419 I

RiemannZeta(s): 0.000003135364 - 0.000019693360 I
 
  • #5
realprecision = 28 significant digits
eps=1e-13
zeta embeded function in PARI/GP
Code:
s=1/2.+I*14.1347
abs(YourZeta(s)-zeta(s))==2.4718664606232304313 E-14  60 iterations 219 mSec
abs(MyZeta(s)  -zeta(s))==1.6630931417336143861 E-15  30 iterations  15 mSec  
abs(zeta(s)    -zeta(s))==0.E-33                      ??              0 mSec
 
Last edited:
1.

What is the Riemann zeta function and how is it computed using Aribas?

The Riemann zeta function is a mathematical function that is important in number theory and analysis. It is defined as the sum of the infinite series 1/n^s, where s is a complex number. Aribas is a computer algebra system that can be used to calculate the values of the Riemann zeta function for different inputs of s.

2.

What are the advantages of using Aribas for computing the Riemann zeta function?

Aribas is a powerful tool for symbolic calculations, making it ideal for computing the Riemann zeta function. It can handle complex numbers and infinite series, which are key components of the function. Additionally, Aribas has a user-friendly interface and can provide accurate results quickly.

3.

Are there any limitations or challenges when using Aribas for computing the Riemann zeta function?

One limitation of using Aribas is that it may not be able to handle extremely large or complex inputs for the Riemann zeta function. This can lead to errors or longer computation times. Additionally, Aribas may not have built-in functions for certain specialized techniques or methods used in calculating the Riemann zeta function.

4.

Can Aribas be used to plot graphs or visualize the Riemann zeta function?

Yes, Aribas has the capability to plot graphs and visualize the Riemann zeta function. This can be helpful in understanding the behavior and properties of the function for different inputs. Aribas also allows for customization of the graph, such as adjusting the scale or adding labels.

5.

Are there any resources or references available for learning more about programming the computation of the Riemann zeta function using Aribas?

Yes, there are various online tutorials, articles, and forums that discuss programming details and techniques for computing the Riemann zeta function using Aribas. Some recommended resources include the official Aribas documentation, the Aribas user group, and research papers on the subject.

Similar threads

Replies
5
Views
3K
  • General Math
Replies
4
Views
1K
Replies
5
Views
1K
Replies
3
Views
249
Replies
2
Views
1K
  • Topology and Analysis
Replies
1
Views
2K
  • General Math
Replies
7
Views
1K
  • Linear and Abstract Algebra
Replies
1
Views
3K
Replies
8
Views
10K
Replies
4
Views
4K
Back
Top