Post Reply 
Riemann's Zeta Function - another approach (RPL)
07-02-2017, 11:53 PM
Post: #35
RE: Riemann's Zeta Function - another approach (RPL)
(07-02-2017 02:54 PM)Dieter Wrote:  First, there is a new approximation for 0,97≤x≤1,03 with an error of approx. ±0,5 units in the 10th significant digit.

Then I realized that for 0,3454<x<0,97 the program may use a constant number of iterations and the results show a relatively constant error (only a few ULP) that can be compensated by a heuristc formula. Here I chose 54 terms, and the result is corrected by an amount of approx. 5 E–9/x¼. This keeps the error within about ±0,6 ULP.

The lower limit for x is the point where Zeta(x) is exactly –1. Beyond this the accuracy will substantially degrade, so x=0,3453726573 is the limit here. Below this the program throws a DATA ERROR.

Great! It needs to be accurate only for x > 0.5. Then the functional equation can handle the rest if Gamma is available.

Your code can be nicely pasted into Free42, except line 91 (because the space between the last digit and E). LBL 2 is not necessary, unless there's a reason to keep it:

Code:

00 { 177-Byte Prgm }
01▸LBL "ZETA"
02 STO 00
03 0,3453726573
04 -
05 SQRT
06 0,03
07 RCL 00
08 1
09 -
10 ABS
11 X>Y?
12 GTO 00
13 LASTX
14 1/X
15 LASTX
16 LASTX
17 0,9135
18 ×
19 13,73336
20 +
21 ÷
22 0,577215664
23 +
24 +
25 RTN
26▸LBL 00
27 26
28 RCL 00
29 ÷
30 2
31 +
32 IP
33 STO+ ST X
34 54
35 X>Y?
36 X<>Y
37 STO 01
38 RCL 00
39 +/-
40 STO 00
41 CLX
42▸LBL 01
43 RCL ST Y
44 RCL 00
45 Y↑X
46 -
47 +/-
48 DSE ST Y
49 GTO 01
50 RCL 00
51 STO+ ST X
52 1
53 -
54 24
55 ÷
56 RCL 01
57 X↑2
58 ÷
59 1
60 RCL 00
61 -
62 8
63 ÷
64 RCL 01
65 ÷
66 +
67 0,5
68 +
69 RCL 01
70 +
71 RCL 00
72 Y↑X
73 2
74 ÷
75 +
76 RCL 00
77 1
78 +
79 2
80 LN
81 ×
82 E↑X-1
83 +/-
84 ÷
85 RCL 00
86 1
87 +
88 SIGN
89 X<0?
90 STO- ST X
91 5,5ᴇ-9
92 ×
93 RCL 00
94 ABS
95 SQRT
96 SQRT
97 ÷
98 -
99 END

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-02-2017 11:53 PM



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