0

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

Praveen B.
  • 91
  • 8

1 Answers1

2

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