Riemann's Zeta Function - another approach (RPL)
|
06-29-2017, 07:47 PM
(This post was last modified: 06-30-2017 06:25 AM by Dieter.)
Post: #22
|
|||
|
|||
RE: Riemann's Zeta Function - another approach (RPL)
(06-28-2017 07:45 PM)Gerson W. Barbosa Wrote: Three lines shorter: Here is my first attempt at a HP41 version for x > 1. Maybe this or that can be reused in your 15C program, e.g. the use of less registers (the 15C would require R0...R2) or the DSE within the loop. Code: 01 LBL"ZETA" Edit: corrected an error in line 47 Your method for calculating the number of required terms of the sum is fine, actually I got the same result. However the program uses a shorter formula that yields very similar results. The final calculation with this power-of-2-fraction can cause significant errors for x close to 1, so I chose a different approach with the 41's e^x–1 function which should reduce the error here. The simplified Zeta evaluation is used for 1 < x ≤ 1,01. At x=1,01 both methods agree and return the correct result 100,5779433. The examples in your first post (except the two cases that cannot be handled by the program above) are all evaluated to ten correct digits. But of course the program is not always that accurate. ;-) Dieter |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)