Post Reply 
Riemann's Zeta Function - another approach (RPL)
07-31-2017, 06:31 PM (This post was last modified: 07-31-2017 06:32 PM by Gerson W. Barbosa.)
Post: #71
RE: Riemann's Zeta Function - another approach (RPL)
(07-31-2017 05:00 PM)Dieter Wrote:  
(07-31-2017 03:59 PM)Gerson W. Barbosa Wrote:  I've tested it on Emu42 set to "Authentic Calculator Speed". The number of terms hasn't been adjusted yet, thus accuracy differences between both can be highlighted:

Hmmm... x=0 should return exactly –0,5 because the coefficients are designed accordingly. So I wonder why you get –0,500000000004. This would mean that one of the coefficients is off by 4 E-12. ?!?

BTW the optimized coefficient set has two slight changes in the last digit:
line 123: -8.47149 E-7
line 131: 3.42683395 E-4

I wonder what might have caused these differences. The coefficients were copied from your HP-41C listing:

 43 -1.276ᴇ-8            18 -1.276 E-8
 44 ×                    19 *
 45 7.05133ᴇ-6           20 7.05133 E-6
 46 -                    21 -
 47 ×                    22 *
 48 9.721157ᴇ-5          23 9.721157 E-5
 49 +                    24 +
 50 ×                    25 *
 51 3.4243368ᴇ-4         26 3.4243368 E-4
 52 -                    27 -
 53 ×                    28 *
 54 0.00484515482        29 4.84515482 E-3
 55 -                    30 -
 56 ×                    31 *
 57 0.07281584288        32 7.281584288 E-2
 58 +                    33 +
 59 ×                    34 *
 60 0.007215664988       35 7.215664988 E-3
 61 +                    36 +


123 -8.4715ᴇ-7          102 -8.4715 E-7
124 ×                   103 *
125 7.51334ᴇ-6          104 7.51334 E-6
126 -                   105 -
127 ×                   106 *
128 9.609657ᴇ-5         107 9.609657 E-5
129 +                   108 +
130 ×                   109 *
131 3.42683396ᴇ-4       110 3.42683396 E-4
132 -                   111 -
133 ×                   112 *
134 0.00484527616       113 4.84527616 E-3
135 -                   114 -
136 ×                   115 *
137 0.07281583446       116 7.281583446 E-2
138 +                   117 +
139 ×                   118 *
140 0.007215664464      119 7.215664464 E-3
141 +                   120 +


(07-31-2017 05:00 PM)Dieter Wrote:  And the error check for x<0 (SQRT in line 29) can be omitted here. ;-)

That was a blind copy, as you can see.

(07-31-2017 05:00 PM)Dieter Wrote:  But remember, the two polynomial approximations are intended for 10 digit calculators. While the approximation for 1<x≤2 has an error less than 1 unit in the 12th digit and thus is useable for the 42s, the one for 0≤x<1 may be off by 4 ULP, so here one more term would make sense. Looking at your examples, indeed the largest error between –1 and +2 is 2 ULP.

This is good enough for me, at least for the time being. I will only double the number of terms, which is an easy thing to do, and see what I get. I'll leave the 42S as it is so anyone interested can improve it, starting by deleting line 29 :-)

Thanks for your work on the two polynomial approximations which have made this fast enough for all arguments in the valid range.

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-31-2017 06:31 PM



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