Download 41Z Manual - Systemyde

Transcript
(c) Ángel M. Martin – June 2013 Riemann’s Zeta function.
Included in the 41Z is an implementation of the Borwein algorithm to calculate the Zeta function.
Considering the task at hand this does an excellent job, providing accurate results in acceptable
execution times. Obviously won’t win the speed contest, nor will it help you find non-trivial zeroes
outside of the critical strip ☺
Example: calculate ζ(2)
2, ZREAL^, ZZETA
FIX 9
-> 1,645+J0
-> 1,644934066
The program is a modified version of JM Baillard’s ZETAZ, written for complex arguments – only
adapted to use the 41Z complex stack and related functions. See the program listing in next page if
interested. The algorithm is summarized as follows:
1. For the case Re(z)<0.5 , 2 formulas may be used
ζ(z) = ζ(1-z) 2^z π^(z-1) sin(π(z/2)) Γ(1-z)
ζ(z) = ζ(1-z) π^(z-1/2) Γ((1-z)/2) / Γ(z/2)
2.
If Re(z) >=0.5
ζ(z) = χ(z) / (1-2^(1-z))
where:
χ (z) = Σ{(-1)^k/k^z}, k=0,1,2,…
is calculated by:
χ (z) = (-1/dn) Σ{(-1)^k (dk-dn)/(k+1)^z}, k=0 to n-1
where:
dk = n Σ{(n+j-1)! 4^j )/((n-j)!(2j)!} , j=0 to k
with an error:
| e | <= (3/(3+sqrt(8))^n) [ 1+2 Im(z) ] exp [ p Im(z) / 2]
Note that dk is calculated using the following approach:
dk = e(0)+e(1)+...+e(k)
where :
e(0)=1 and
2(n^2 – j^2) e(j)
e(j+1) = ---------------------[(1+j)(2j+1)]
41Z User Manual Page 48 of 90