41C/CV root finders
|
05-30-2015, 02:04 PM
(This post was last modified: 05-30-2015 02:05 PM by Ángel Martin.)
Post: #46
|
|||
|
|||
RE: 41C/CV root finders
(05-30-2015 12:37 PM)Dieter Wrote: There is a similar method like the one suggested in post #13. The calculation of your f(i) and f'(i) could get implemented this way: Thanks for the additional suggestions Dieter, indeed you're getting to the end of this and that's appreciated. I tend to use more "linear" expressions in MCODE because they don't require any storage of intermediate values, like "a", and "b" above. Yes I know this saves time when reused in both formulas but the problem with 13-digit values is you run out of scratch registers very quickly. Realize you'll need 4 standard registers to store a/b in 13-digit format, and that for convenience in the recall.store actions the stack is already used up with the TVM data. There's always the ALPHA registers of course, but I'm already using M,N, and O. I don't want to use any data register above R5 either. Let me think about that, I like the approach and sure it's worth a try. (05-30-2015 12:37 PM)Dieter Wrote: Regarding cases with no solutions and infinite looping: I think there is a better way than a simple loop counter. The value of abs(delta_i) could be saved in each loop and get compared to one from the previous iteration. If it is larger, i.e. the iteration is divergent, the program may exit with an error message. I am currently testing this in a 35s program. Completely agree. Typically a diverging process won't recoup itself into a converging one, or will it? '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)