Post Reply 
Riemann's Zeta Function - another approach (RPL)
07-10-2017, 10:52 PM (This post was last modified: 07-10-2017 10:53 PM by Gerson W. Barbosa.)
Post: #48
RE: Riemann's Zeta Function - another approach (RPL)
(07-10-2017 11:49 AM)Dieter Wrote:  Here is an even more optimized coefficient set:

c0 =  0,577215664857
c1 =  0,072815841271
c2 = -0,004845236463
c3 = -0,000342577145
c4 =  0,000096241083
c5 = -0,000007415866
c6 = -0,000000821217

With this set it seems less likely that the error rounds to 6 ULP at two crucial points (e.g. at x=0,34537... where Zeta changes from –0,9999... to –1).
The results you posted do not change much, exept that Zeta(0,2) now is dead on. ;-)

In order to avoid unneccessary roundoff errors I would suggest the following way of evaluating the approximation: Calculate the polynomial in u first. If u>0 add 1/u. Else add (u+1)/u and subtract 1 afterwards. This also is the method in the proposed program.

No typos this time :-)

>LIST
10 FOR X=0 TO 1.1 STEP .1
12 IF X=1.1 THEN X=1.05
15 U=X-1
20 Z=U*(U*(U*(-.000000821217*U-.000007415866)+.000096241083)-.000342577145)
25 Z=U*(U*(Z-.004845236463)+.072815841271)+.577215664857
30 IF U>0 THEN Z=Z+1/U ELSE Z=Z+(U+1)/U-1
35 DISP X;Z
40 NEXT X
>RUN
0 -.5
.1 -.603037519853
.2 -.733920924896
.3 -.904559257257
.4 -1.13479778385
.5 -1.46035450877
.6 -1.9526614482
.7 -2.77838844558
.8 -4.43753841593
.9 -9.43011401936
WARNING line 30: /zero
1 9.99999999999E499
1.05 20.5808443016


(Windows 10, 64 bits, Emu75/DOS, DOSBox)

Gerson.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Riemann's Zeta Function - another approach (RPL) - Gerson W. Barbosa - 07-10-2017 10:52 PM



User(s) browsing this thread: 3 Guest(s)