Zeta Function
|
01-19-2016, 09:57 PM
(This post was last modified: 01-19-2016 09:58 PM by Namir.)
Post: #1
|
|||
|
|||
Zeta Function
Here is a program that calculates the Zeta function. The program prompts you for s, the argument for the function, and for the tolerance value (recommend 1e-8). The function places the function's value in the X stack register,
Code: 1 LBL "ZETA" The memory map for the program is: Code: R00 = s The function uses a fast converging series (see Wikipedia) and can give results for small arguments of s such as Zeta(1.1). Namir PS: I am aware that Jean-Marie Baillard has a Zeta function implemented in the HP-41C Software Library. His program is shorter than mine and uses just two registers. However, I tried to calculate Zeta(1.1) using his version and I had to stop after the HP-41CX emulator went on and on and on! |
|||
01-24-2016, 09:25 AM
(This post was last modified: 01-24-2016 09:26 AM by Ángel Martin.)
Post: #2
|
|||
|
|||
RE: Zeta Function
(01-19-2016 09:57 PM)Namir Wrote: PS: I am aware that Jean-Marie Baillard has a Zeta function implemented in the HP-41C Software Library. His program is shorter than mine and uses just two registers. However, I tried to calculate Zeta(1.1) using his version and I had to stop after the HP-41CX emulator went on and on and on! Hi Namir, I guess you must have something wrong in your V41 setup - or a bad transcription of the program code. I just ran the case x=1.1 using ZETAX in the SandMath (which implements Jean-Marc's Borwein algorithm) and it took 13.48 seconds to return the result 10.58444847. I also ran it for x=1.001, which returned 1,000.577289 in approximately the same time. Both examples done at the default speed, i.e. NOT in TURBO mode. Cheers, 'AM "To live or die by your own sword one must first learn to wield it aptly." |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)