Riemann-Siegel Z and Theta Functions in PARI/GP

88 Views Asked by At

How can we use PARI/GP to calculate the Riemann-Siegel Theta function and/or the Riemann-Siegel Z function?

https://mathworld.wolfram.com/Riemann-SiegelFunctions.html

1

There are 1 best solutions below

0
On BEST ANSWER

You can translate the formulas (2) and (1) from your source just literally:

(09:38) gp > rtheta(t)=imag(lngamma(1/4+I*t/2))-log(Pi)*t/2
%1 = (t)->imag(lngamma(1/4+I*t/2))-log(Pi)*t/2
(09:39) gp > z(t)=exp(I*rtheta(t))*zeta(1/2+I*t)
%2 = (t)->exp(I*rtheta(t))*zeta(1/2+I*t)
(09:40) gp > z(2.0)
%3 = -0.53963312564614487202970239667093128084 + 1.3224311446750734465 E-38*I