Riemann's Zeta Function - another approach (RPL)
|
08-07-2017, 08:52 AM
(This post was last modified: 08-08-2017 06:48 PM by Dieter.)
Post: #81
|
|||
|
|||
RE: Riemann's Zeta Function - another approach (RPL)
(08-04-2017 07:26 PM)Dieter Wrote: 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. #-) There is a better solution. Since \(\zeta '(0) = -\ln\sqrt{2 \pi}\), for x close to zero \(\zeta(x)\ \approx -(0.5+x\cdot\ln\sqrt{2 \pi})\). So the program may simply switch to this as soon as |x| is sufficiently small. For the given program a good threshold is at 2 E–11. So if |x| is larger than this, use the regular method, and all |x| up to this limit may use the simple formula above. This is what I now have implemented in my Free42 program. Here is the modified listing. The changes are in the first lines before the XEQ 77 call, and the STO 00 after LBL 77 has been omitted. Edit: changed the threshold in line 08 from 1E–11 to 2E–11. Code: 00 { 434-Byte Prgm } And again: please note that this version is intended for high-precision environments like Free42 and may not perform well on a regular 42s. Dieter |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)