Riemann's Zeta Function - another approach (RPL)
|
08-04-2017, 07:26 PM
(This post was last modified: 08-04-2017 08:15 PM by Dieter.)
Post: #78
|
|||
|
|||
RE: Riemann's Zeta Function - another approach (RPL)
[quote='Gerson W. Barbosa' pid='76831' dateline='1501861065']
Back to the HP-41: Code: 01▸LBL "ZETA" Just one remark: Testing condition1 OR condition2 can be done with a simple trick from the olden days. Simply have the inverse of condition1 followed by condition2. Code: 01▸LBL "ZETA" And the calculation of the number of terms should be replaced by this: Code: 64▸LBL 96 At the moment I am trying a Free42 version. Due to the 34-digit precision some things can be substantially simplified, e.g. most of the code following LBL 98 can be replaced by a simple x<>y 1/x + without all the stack acrobatics. And a result which usually returns 12 valid digits should be possible. Edit: here is the current version. It addresses the x~0 problem in a ...err... "creative" way in that the smallest |x| is set to 1E–20. #-) Please note that this version is intended for high-precision environments like Free42 and may not perform as well on a regular 42s. Code: 00 { 416-Byte Prgm } At least the results look quite good. Since x is returned in the upper display line you can see if a value very close to zero has been replaced by 1E–20. Dieter |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)