Post Reply 
Riemann's Zeta Function - another approach (RPL)
07-25-2017, 04:29 PM (This post was last modified: 07-25-2017 04:45 PM by Dieter.)
Post: #61
RE: Riemann's Zeta Function - another approach (RPL)
(07-25-2017 04:00 PM)Gerson W. Barbosa Wrote:  If it is just a copy & paste matter, would you please provide a listing? Thanks!

I am currently experimenting with some adjustments to squeeze out the best possible accuracy. Here is the latest version. It includes several measures to keep intermediate results with more digits than required by the final result. That's why the constant c0 in line 35 and 119 has been decreased by 0,57 (which is added back later) so that in effect this crucial value can be given to 12 decimals.

Here is the listing:

Code:
 01 LBL "ZETA"
 02 STO 00
 03 SQRT
 04 RCL 00
 05 1
 06 -
 07 1/X
 08 LASTX
 09 X<0?
 10 GTO 97
 11 2
 12 RCL 00
 13 X>Y?
 14 GTO 96
 15 LASTX
 16 LASTX
 17 LASTX
 18 -1.276 E-8
 19 *
 20 7.05133 E-6
 21 -
 22 *
 23 9.721157 E-5
 24 +
 25 *
 26 3.4243368 E-4
 27 -
 28 *
 29 4.84515482 E-3
 30 -
 31 *
 32 7.281584288 E-2
 33 +
 34 *
 35 7.215664988 E-3
 36 +
 37 GTO 98
 38 LBL 96
 39 24
 40 RCL 00
 41 /
 42 2
 43 +
 44 INT
 45 ST+ X
 46 22
 47 X>Y?
 48 X<>Y
 49 STO 01
 50 RCL 00
 51 CHS
 52 STO 00
 53 CLX
 54 LBL 01
 55 RCL Y
 56 RCL 00
 57 Y^X
 58 -
 59 CHS
 60 DSE Y
 61 GTO 01
 62 RCL 00
 63 ST+ X
 64 1
 65 -
 66 RCL 01
 67 X^2
 68 24
 69 *
 70 /
 71 1
 72 RCL 00
 73 -
 74 8
 75 /
 76 RCL 01
 77 /
 78 +
 79 .5
 80 +
 81 RCL 01
 82 +
 83 RCL 00
 84 Y^X
 85 2
 86 /
 87 +
 88 1
 89 RCL 00
 90 +
 91 2
 92 LN
 93 *
 94 E^X-1
 95 CHS
 96 /
 97 GTO 99
 98 LBL 97
 99 ENTER
100 ENTER
101 ENTER
102 -8.4715 E-7
103 *
104 7.51334 E-6
105 -
106 *
107 9.609657 E-5
108 +
109 *
110 3.42683396 E-4
111 -
112 *
113 4.84527616 E-3
114 -
115 *
116 7.281583446 E-2
117 +
118 *
119 7.215664464 E-3
120 +
121 LBL 98
122 RDN
123 1/X
124 INT
125 ST* Z
126 SIGN
127 ST/ X
128 ST- Z
129 X<> L
130 RDN
131 /
132 -
133 R^
134 .57
135 +
136 +
137 LBL 99
138 END

The program uses a polynomial approximation for 0≤x<1, another one for 1<x≤2 and your original method for x>2. Line 03 and 07 generate an error if x<0 or x=1. The steps between LBL 98 and 99 add 1/(x–1) + 0,57 while trying to preseve as much accuracy as possible. This way e.g. Zeta(1,5) carries 12 digits (...7534869) before the last addition delivers the final result 2,612375349.

Dieter
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) - Dieter - 07-25-2017 04:29 PM



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