Post Reply 
Riemann's Zeta Function - another approach (RPL)
07-07-2017, 07:40 PM (This post was last modified: 07-09-2017 01:40 PM by Dieter.)
Post: #39
RE: Riemann's Zeta Function - another approach (RPL)
(07-03-2017 07:30 PM)Dieter Wrote:  I tried a fourth-order polynomial and the results are quite promising. You can go all the way from 1,1 down to 0,5 (!) with an error less than half a unit in the 10th significant digit.

If you got a calculator with, say, 12 digit precision. ;-)

Anyway, here is a final addition. It is a fifth order approximation for 0≤x≤1,05 which has been tested in Excel with every intermediate result rounded to 10 significant digits. And indeed the results seem to match those on a real 15C or 41C. If the implementation is carefully coded, cf. step 23 ff. in the listing below, the results should be within 2 units in the 10th place. Which I think is as good as it gets with ten-digit working precision.

The formula:

Zeta(x) = 1/u + 0,577215668 + 0,0728159383 · u – 0,0048444781 · u² – 0,0003401389 · u³ + 0,0001000277 · u4 – 4,58184E-6 · u5
where u = x – 1  and  0 ≤ x ≤ 1,05.

Edit: please note the slightly improved coefficients in post #42.

After storing the constants in R0 (=0,5772...) to R5 (=–4,58184E-6) – be sure to observe the correct signs – the following program should yield results within 2 ULP. If you find cases with larger errors, please report here.

Code:
01 LBL A
02 1
03 -
04 ENTER
05 ENTER
06 ENTER
07 RCL 5
08 *
09 RCL 4
10 +
11 *
12 RCL 3
13 +
14 *
15 RCL 2
16 +
17 *
18 RCL 1
19 +
20 *
21 RCL 0
22 +
23 1
24 R^
25 +
26 LstX
27 /
28 +
29 1
32 -
33 RTN

Examples:

1,05 => 20,58084431  (+1 ULP)
0,5  => -1,460354508 (–1 ULP)
 0   => -0,5000000000 (exact)


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-07-2017 07:40 PM



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