implemented the Riemann-Siegel Z-function