Bernoulli Numbers
|
01-28-2014, 09:21 PM
Post: #2
|
|||
|
|||
RE: Bernoulli Numbers
(12-18-2013 12:52 AM)Namir Wrote: Bernoulli Numbers using Series Approximations Hi Namir, I think the RCL 00 in your line 31 should read RCL 01, right? Then I tried my own implementation of this algorithm. I changed the way the tolerance is handled. If the user does not enter one, the current value in R01 is used. If this value is >=1 or <0, the tolerance defaults to 1E-5. Also the number of iterations is calculated beforehand so that the loop requires no tests and a simple DSE counter will do. The following version uses only R00 - R02, and even R02 may be replaced with a stack register if the calculation of the factor starting at line 25 is placed behind the loop. Also no flags are required. Code:
What do you think? Any errors or things to change? Dieter |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Bernoulli Numbers - Namir - 12-18-2013, 12:52 AM
RE: Bernoulli Numbers - Dieter - 01-28-2014 09:21 PM
RE: Bernoulli Numbers - Dieter - 01-30-2014, 02:37 PM
RE: Bernoulli Numbers - Namir - 01-30-2014, 09:34 PM
|
User(s) browsing this thread: 1 Guest(s)