Post Reply 
41C/CV root finders
05-27-2015, 12:30 AM
Post: #21
RE: 41C/CV root finders
(05-26-2015 10:08 PM)Dieter Wrote:  I could do so if I was more familiar with V41. ;-)

Dieter - V41 is very easy to setup, load Application ROMs (using .mod files) and run apps much faster than a real 41. You can basically access ALL the HP ROMs plus most of the 3rd party ROMs ever released.

You can probably download, install and learn it in the time it takes to add one of your always interesting posts.

For real number crunching, of course a physical machine is preferred (unless there is a long run-time, then V41 is preferred), but to explore new software, or the occasional "what are those guys talking about, I just gotta know" itch, V41 is likely the easiest way to load a new Application ROM.

Recommended!!

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
05-27-2015, 05:17 AM (This post was last modified: 05-27-2015 05:22 AM by Ángel Martin.)
Post: #22
RE: 41C/CV root finders
(05-26-2015 10:08 PM)Dieter Wrote:  
(05-26-2015 09:26 PM)Ángel Martin Wrote:  Not sure I follow, I didn't try the example before - but I just ran it an here are the results:

10 = (n)
50 = (PV)
–30 =(PMT)
400 = (FV)

I=14.43587035% in end mode, and
I=10.20509732% in begin mode

That's close to the exact results (14,43587133% and 10,20509807%). I still wonder why an estimate > 100% leads to these results instead of the second, larger solutions.


Well, the initial guess is i0 = 0,01650475658, alas not greater than 100% (I don't remember saying anything about it being over 100% before, was than in another thread??), and the number of loops (iterations) needed is 7 for the "begin" case and 13 for the "end" case. On the CL (or V41 in turbo mode) it's obtained in the blink of an eye.

I'm positive my implementation isn't earth-shattering or novel-prize material Dieter, I just wanted to have a reliable TVM$ added to the SandMath on the 41 platform - using MCODE. So I wrote it from the scratch, not copied from the 12C or anything. Besides the i% solver it also has a very nice U/I that mimics the 12C design almost to the last detail, with alphanumeric characters for the results.

I guess what I'm saying is that it works for me and hopefully also does for other folks. Naturally will be nice to improve it, say implement the counter idea: how many loops are too many and where would you put the cut-off point?

Cheers,
'AM

"To live or die by your own sword one must first learn to wield it aptly."
Find all posts by this user
Quote this message in a reply
05-27-2015, 01:50 PM (This post was last modified: 05-27-2015 01:52 PM by Dieter.)
Post: #23
RE: 41C/CV root finders
(05-27-2015 05:17 AM)Ángel Martin Wrote:  Well, the initial guess is i0 = 0,01650475658, alas not greater than 100% (I don't remember saying anything about it being over 100% before, was than in another thread??) ...

No, that was me. ;-)

You said the inital guess was evaluated as abs(PV+n*PMT+FV))^(1/n). Which is almost always > 1 i.e. > 100%. For the example the result is 150^0,1 = 1,650475 = 165,0475%. Hmmm... the actual estimate is exactly 1/100 of this, so your i0 formula must be slightly different.

(05-27-2015 05:17 AM)Ángel Martin Wrote:  ...and the number of loops (iterations) needed is 7 for the "begin" case and 13 for the "end" case. On the CL (or V41 in turbo mode) it's obtained in the blink of an eye.

Hmm... 7 or 13 iterations? I am sure it works for you, but maybe... maybe I can trigger your ambition a bit anyway...? ;-) I tried a simple program in HP41 user code. It returns the two interest rates in both cases (begin and end mode) after merely 4 iterations. And both results are dead on.

I also tried the same algorithm with your initial estimate. Again, it took not more than 5 iterations, and both results were exact.

(05-27-2015 05:17 AM)Ángel Martin Wrote:  I guess what I'm saying is that it works for me and hopefully also does for other folks. Naturally will be nice to improve it, say implement the counter idea: how many loops are too many and where would you put the cut-off point?

Please don't get me wrong. Everything is fine if the current implementation works for you. But I can't help: my ambition is to trigger yours. ;-)

Dieter
Find all posts by this user
Quote this message in a reply
05-27-2015, 03:03 PM
Post: #24
RE: 41C/CV root finders
(05-27-2015 01:50 PM)Dieter Wrote:  You said the inital guess was evaluated as abs(PV+n*PMT+FV))^(1/n). Which is almost always > 1 i.e. > 100%. For the example the result is 150^0,1 = 1,650475 = 165,0475%. Hmmm... the actual estimate is exactly 1/100 of this, so your i0 formula must be slightly different.

correct - it is divided by 100 ;-)

(05-27-2015 01:50 PM)Dieter Wrote:  Hmm... 7 or 13 iterations? I am sure it works for you, but maybe... maybe I can trigger your ambition a bit anyway...? ;-) I tried a simple program in HP41 user code. It returns the two interest rates in both cases (begin and end mode) after merely 4 iterations. And both results are dead on.

I also tried the same algorithm with your initial estimate. Again, it took not more than 5 iterations, and both results were exact.

We're comparing apples to oranges - the number of MCODE loops are not exactly the same concepts as the iterations in the FOCAL code, sorry but that's not a one-to-one match. Besides the MCODE speed is significantly faster... are you saying that your FOCAL program finds the solution *faster* than the 12C?


(05-27-2015 01:50 PM)Dieter Wrote:  Please don't get me wrong. Everything is fine if the current implementation works for you. But I can't help: my ambition is to trigger yours. ;-)

And you have achieved that, so which initial guess do you suggest I should try?

Cheers,
ÁM

"To live or die by your own sword one must first learn to wield it aptly."
Find all posts by this user
Quote this message in a reply
05-27-2015, 07:15 PM (This post was last modified: 05-27-2015 07:42 PM by Dieter.)
Post: #25
RE: 41C/CV root finders
(05-27-2015 03:03 PM)Ángel Martin Wrote:  correct - it is divided by 100 ;-)

I see. So the formula is abs(pv+n*pmt+fv)^(1/n) / 100. I tried this estimate for a number of different scenarios, and in most cases the result is somewhere between 1 and 2%. So one could just as well use a fixed estimate of 1%. Or did I get something wrong?

(05-27-2015 03:03 PM)Ángel Martin Wrote:  We're comparing apples to oranges - the number of MCODE loops are not exactly the same concepts as the iterations in the FOCAL code, sorry but that's not a one-to-one match.

But why does it require so many iterations? And why is the result off in the last digits, although 13 digit extended precision is used? Sorry, I just want to understand.

(05-27-2015 03:03 PM)Ángel Martin Wrote:  Besides the MCODE speed is significantly faster... are you saying that your FOCAL program finds the solution *faster* than the 12C?

No, of course not. #-) Although I do not own a 12C I assume its internal "machine code" runs much faster than my trusted 41C/CV. Here one iteration takes about two seconds, so the result for the test case appears in about 10 seconds. On the 35s it's about 3 seconds. And on the 34s it's virtually instant.

(05-27-2015 03:03 PM)Ángel Martin Wrote:  And you have achieved that, so which initial guess do you suggest I should try?

I would suggest the formula at the bottom of post #13 in this thread. There you'll also find the other mathematics I use.
However, cases may exist where the denominator of i0 becomes zero. So I would do it this way:

Code:
i0 = 2 / n * (PV + n*PMT + FV) / (PMT * (n±1) + 2*PV)
If the denominator becomes zero, simply use
Code:
i0 = 2 / (n±1)
instead.

In both cases use n–1 for END mode and n+1 for BEGIN.

BTW, if the nominator is zero, i.e. i0 itself is zero, the program can exit: in this case the interest rate actually is zero. Exiting at this point also avoids the usual problems that arise when the TVM equation is evaluated at i=0.

For the record, this is how i converges in the test case, using the suggested estimate and a simple FOCAL program with 10-digit precision:

Code:
#  end mode       begin mode
0: 0,1764705882   0,1304347826
1: 0,1448795054   0,1037633008
2: 0,1443589083   0,1020575265
3: 0,1443587133   0,1020509808
4: 0,1443587133   0,1020509807

Of course you may also simply start at i0 = 10–4.
The subsequent approximations then are essentially the same as listed above. ;-)

Dieter
Find all posts by this user
Quote this message in a reply
05-27-2015, 10:09 PM
Post: #26
RE: 41C/CV root finders
(05-21-2015 07:36 PM)Dieter Wrote:  Try the standard example:

  10 STO 01 (n)
  50 STO 03 (PV)
–30 STO 04 (PMT)
400 STO 05 (FV)

XEQ"I%" => 14,4359

The program evaluates a first guess of 9,8361% and finally returns 14,4359% after five iterations. With flag 01 set (BEGIN) the result is 10,2051%.

Dieter

Hi,
Just for fun, I tried out the "standard example" above on my financial calculators, HP-37E and 38C. Also tried on an emulator for the 12C. On each of these, if I tried to solve for "i" the display would show "Error 5" apparently for "illegal cash flows." However, if I plug in the interest rates you got, and solved for n, PV. PMT & FV, I get exactly the other values.

My HP-41CV is not working, so I couldn't try out the interest rate solver in the finance pac or in the PPC ROM.

I'm curious, has anyone tried out this example on either the Finance Pac or PPC ROM TVM programs on the HP-41 ? Does it yield the results shown above or does it give an error message?

Bob
Find all posts by this user
Quote this message in a reply
05-27-2015, 11:08 PM
Post: #27
RE: 41C/CV root finders
(05-27-2015 12:30 AM)rprosperi Wrote:  Dieter - V41 is very easy to setup, load Application ROMs (using .mod files)

It's not very intuitive. But OK, I now played around a bit with it, I read the help file and then I remembered how to access the various ROM modules. But no, I do not have a .mod file of Ángel's TVM module. I fear I would not even know where to look for it. #-)

(05-27-2015 12:30 AM)rprosperi Wrote:  ...and run apps much faster than a real 41.

That's one of the non-trivial things. I use V41 version 8. There are two speed controls in the menu that is accessed via Options > More settings. I never understood the idea behind the "speed" and the "turbo" setting. The turbo label says "activate with TAB" - and the help file just says this: that this function is activated by the TAB key... #-)

Yes, V41 is really nice. But it takes its time to get accustomed to it.

Dieter
Find all posts by this user
Quote this message in a reply
05-27-2015, 11:16 PM (This post was last modified: 05-27-2015 11:40 PM by Dieter.)
Post: #28
RE: 41C/CV root finders
(05-27-2015 10:09 PM)bshoring Wrote:  Just for fun, I tried out the "standard example" above on my financial calculators, HP-37E and 38C. Also tried on an emulator for the 12C. On each of these, if I tried to solve for "i" the display would show "Error 5" apparently for "illegal cash flows." However, if I plug in the interest rates you got, and solved for n, PV. PMT & FV, I get exactly the other values.

Yes, the example is not trivial. Both PV and FV are positive, so that there are two possible solutions for the interest rate – or possibly no solution at all. ;-)

(05-27-2015 10:09 PM)bshoring Wrote:  My HP-41CV is not working, so I couldn't try out the interest rate solver in the finance pac or in the PPC ROM.

I just tried V41 with the TVM function of the Advantage Pac.
Result: "$ERROR". #-)

Maybe this is HP's way of telling the user that this TVM scenario is not trivial and may have no or multiple solutions. Or maybe in their opinion it doesn't make much sense financially, although there is a mathematical solution (resp. even two).

Dieter
Find all posts by this user
Quote this message in a reply
05-28-2015, 05:44 AM (This post was last modified: 05-28-2015 07:13 AM by Ángel Martin.)
Post: #29
RE: 41C/CV root finders
(05-27-2015 11:08 PM)Dieter Wrote:  But no, I do not have a .mod file of Ángel's TVM module. I fear I would not even know where to look for it. #-)

It's posted at TOS but I cannot copy-paste the link here as we all know. I can send you the module via email, pls. send me your address via PM.

'A.

Edit: here's the link to the documentation though:
http://hp41.claughan.com/file/TVM_1E%20QRG.pdf

"To live or die by your own sword one must first learn to wield it aptly."
Find all posts by this user
Quote this message in a reply
05-28-2015, 06:19 AM
Post: #30
RE: 41C/CV root finders
(05-27-2015 10:09 PM)bshoring Wrote:  I'm curious, has anyone tried out this example on either the Finance Pac or PPC ROM TVM programs on the HP-41 ? Does it yield the results shown above or does it give an error message?

I just tried the Advantage's TVM and the PPC's FI - both flunk.
They are also included in the TVM Module BTW

So it's a relief to see how my TVM$ MCODE implementation succeeds, even if using more iterations than the optimal ;-)

Cheers,
'AM

"To live or die by your own sword one must first learn to wield it aptly."
Find all posts by this user
Quote this message in a reply
05-28-2015, 08:42 AM (This post was last modified: 05-28-2015 08:42 AM by Dieter.)
Post: #31
RE: 41C/CV root finders
(05-28-2015 06:19 AM)Ángel Martin Wrote:  I just tried the Advantage's TVM and the PPC's FI - both flunk.
They are also included in the TVM Module BTW

I remember also the Standard Pac includes a TVM program ("FIN"). Tried it in V41, et voilà – there is a solution: "I=14,44%".

However, HP else seems to rule out certain combinations of the TVM variables. Maybe these are actually those that lead to multiple or no solution(s). This can be checked.

In fact solving such cases (and some others) is not as easy as it is with a continuously increasing or decreasing TVM function. And finding an initial estimate isn't either. For instance, the guess I posted may cause the solver to find a negative root even if there is a positive one. Maybe the best option then is having the user provide an estimate. #-)

Dieter
Find all posts by this user
Quote this message in a reply
05-28-2015, 09:59 AM (This post was last modified: 05-28-2015 09:59 AM by Dieter.)
Post: #32
RE: 41C/CV root finders
(05-27-2015 07:15 PM)I Wrote:  I would suggest the formula at the bottom of post #13 in this thread. There you'll also find the other mathematics I use.
However, cases may exist where the denominator of i0 becomes zero. So I would do it this way:

Here's another, very simple method:

Code:
i0 = 2 / n * (PV + n*PMT + FV) / (FV – PV)

The estimate is the same for BEGIN and END mode. Here the denominator only becomes zero if FV = PV, which does not make much sense anyway. ;-)

This is a simplification of another estimate that I use for quite some time which works very well. The original formula uses (n+1) and (n–1) as the factors at PV resp. FV, while this simplified method uses n for both.

But again, there is no "golden estimate" that works well for all possible cases.

Dieter
Find all posts by this user
Quote this message in a reply
05-28-2015, 11:27 AM (This post was last modified: 05-28-2015 11:28 AM by Ángel Martin.)
Post: #33
RE: 41C/CV root finders
(05-28-2015 09:59 AM)Dieter Wrote:  Here's another, very simple method:

Code:
i0 = 2 / n * (PV + n*PMT + FV) / (FV – PV)

The estimate is the same for BEGIN and END mode. Here the denominator only becomes zero if FV = PV, which does not make much sense anyway. ;-)

I'll try this one first - easier to fit in the current room available. Will report results when done.

I agree if FV = PV the user deserves to get an error message, ha!

As to why the accuracy isn't 13-digits in the result - I was trying to avoid instabilities in the Newton algorithm, which happen due to oscillations around the result. I probably went overboard since the code checks that the delta be less than 1 E-8 and not 1 E-10 - I just assumed that many decimal digits don't make much sense for the nature of the variable, the interest rate (where anything beyond 2 decimal digits will probably be frowned at).

ÁM

"To live or die by your own sword one must first learn to wield it aptly."
Find all posts by this user
Quote this message in a reply
05-28-2015, 01:54 PM
Post: #34
RE: 41C/CV root finders
With the new initial estimation there's a marginal improvement - two iteration less if compared against e-8, or just one less if using the e-9 criteria.

It occured to me the reason for the larger number of loops could be that I check for f(i)/f '(i) to meet that criteria, and not for f(i) alone. This is more demanding when f '(i)<1, as the quotient would be larger than the numerator and thus a bit counterproductive...

"To live or die by your own sword one must first learn to wield it aptly."
Find all posts by this user
Quote this message in a reply
05-28-2015, 06:33 PM
Post: #35
RE: 41C/CV root finders
(05-28-2015 01:54 PM)Ángel Martin Wrote:  With the new initial estimation there's a marginal improvement - two iteration less if compared against e-8, or just one less if using the e-9 criteria.

This sounds like there is something wrong with f(i) and/or f'(i). Could you post these two formulas here?

A Newton-style solver should converge roughly quadratically, and the version I use does so. Here are the iteration results for the sample case. "err_abs" is the applied correction (delta_i) in that iteration step, and "err_rel" is the quotient of this and the current approximation, i.e. delta_i : i.

Code:
Initial estimate: 0,08571428572

     err_abs =     err_rel =   new i =
it#  f(i)/f'(i)    err_abs:i   i - delta_i
-------------------------------------------
(1)  -6,23 E-02   -4,21 E-01   0,1480341636
(2)   3,67 E-03    2,54 E-02   0,1443681501
(3)   9,44 E-06    6,54 E-05   0,1443587134
(4)   2,49 E-10    1,72 E-09   0,1443587132
-------------------------------------------

This nicely shows the quadratic convergence: the error is order of 10–1, 10–2, 10–5 and finally 10–9,
Here the program quits since 1,72 E-9 is below the error limit of 5 E–8.

(05-28-2015 01:54 PM)Ángel Martin Wrote:  It occured to me the reason for the larger number of loops could be that I check for f(i)/f '(i) to meet that criteria, and not for f(i) alone.

Sure, this is what I do as well. f(i)/f'(i) is the correction term, the mentioned "delta i". My 10-digit program quits if delta_i : i drops below 5E–8. Due to the quadratic convergence one can expect the result to be exact to 12–14 digits, plus/minus a slight unavoidable error in the last digit(s) due to roundoff.

(05-28-2015 01:54 PM)Ángel Martin Wrote:  This is more demanding when f '(i)<1, as the quotient would be larger than the numerator and thus a bit counterproductive...

Are there really cases where f'(i) is less than 1? Usually f'(i) is of similar magnitude as the payments, i.e. around 100 or 1000. For the sample case I get values around 4000 or 5000. You seem to use a different definition of the TVM function and its derivative. Sounds interesting, so again I would like to ask for the formulas you use.

BTW, thank you for the MOD files. I will use them with V41 and see what's in there. ;-)

Dieter
Find all posts by this user
Quote this message in a reply
05-28-2015, 09:37 PM (This post was last modified: 05-28-2015 09:38 PM by bshoring.)
Post: #36
RE: 41C/CV root finders
(05-28-2015 06:19 AM)Ángel Martin Wrote:  
(05-27-2015 10:09 PM)bshoring Wrote:  I'm curious, has anyone tried out this example on either the Finance Pac or PPC ROM TVM programs on the HP-41 ? Does it yield the results shown above or does it give an error message?

I just tried the Advantage's TVM and the PPC's FI - both flunk.
They are also included in the TVM Module BTW

So it's a relief to see how my TVM$ MCODE implementation succeeds, even if using more iterations than the optimal ;-)

Cheers,
'AM

For what it's worth, I played around with a few scenarios where the PV & FV are of the same sign and the PMT is of the opposite. When set to Begin Mode, it will compute "I" if PV is very small and FV is much larger, say 6 and 390 respectively. If in End mode, the reverse is true. Otherwise I get Error 5. This is on an HP-37E.


Regards,
Bob
Find all posts by this user
Quote this message in a reply
05-28-2015, 09:50 PM
Post: #37
RE: 41C/CV root finders
(05-28-2015 05:44 AM)Ángel Martin Wrote:  [ TVM module ]
It's posted at TOS but I cannot copy-paste the link here as we all know. I can send you the module via email, pls. send me your address via PM.

Got it (thank you), and installed it on V41 version 8.
Here are the results:
  • After turning on V41 the auto-assignment starts ("Working..."). But the assigned functions are not those of the TVM module. Function names like BITVIEW or ROTXY seem to refer to a different ROM. I had the Advantage ROM installed. After removing this, everything works fine. Now only TVM 1E and the P#4 library are installed.
  • Then I tried the sample problem posted earlier. After calling "I$" the display shows "Running...", then the correct solution is returned. I expected the result to be slighty off, like the one you posted, but actually it is exact in all 10 digits: "I=14,43587133". Great.
  • For this result the I$ function required about 9 seconds on V41. This is about the same as on my hardware 41CV with a simple FOCAL program. I am using V41 version 8 with default speed settings, which runs faster than my hardware 41CV. However, I noticed that after 4 seconds the "Running..." display flickered a few times.
  • I tried the same example in BEGIN mode. This time the I$ function required 19 seconds on V41, and the result was correct when rounded to 8 significant digits: "I=10,20509781".

I admit I would not have expected times near 10 or 20 seconds on V41. This would translate to about 15...30 seconds on a physical '41. Do you think there is something wrong with my V41 setup?

Dieter
Find all posts by this user
Quote this message in a reply
05-29-2015, 07:58 AM
Post: #38
RE: 41C/CV root finders
(05-28-2015 09:50 PM)Dieter Wrote:  [*] After turning on V41 the auto-assignment starts ("Working..."). But the assigned functions are not those of the TVM module. Function names like BITVIEW or ROTXY seem to refer to a different ROM. I had the Advantage ROM installed. After removing this, everything works fine. Now only TVM 1E and the P#4 library are installed.

You had an XROM conflict because the TVM uses the same number as one of the Advantage pages. Simply removing the advantage solves it, as you did. As I said before, the TVM$ Module also has a copy of the Advantage's TVM so you don;t need to have both plugged in. Ditto for the PPC's "FI" and 'FIN" programs - they're also included in the TVM$ Module.


(05-28-2015 09:50 PM)Dieter Wrote:  [*] For this result the I$ function required about 9 seconds on V41. This is about the same as on my hardware 41CV with a simple FOCAL program. I am using V41 version 8 with default speed settings, which runs faster than my hardware 41CV. However, I noticed that after 4 seconds the "Running..." display flickered a few times.

The LCD flickering is intended - it does it each time a new iteration begins.

(05-28-2015 09:50 PM)Dieter Wrote:  [*] I tried the same example in BEGIN mode. This time the I$ function required 19 seconds on V41, and the result was correct when rounded to 8 significant digits: "I=10,20509781".

I admit I would not have expected times near 10 or 20 seconds on V41. This would translate to about 15...30 seconds on a physical '41. Do you think there is something wrong with my V41 setup?

The speed depends on the selected settings, I imagine you have already seen that in V41 configuration screens. You can always press the TAB key when the program runs to engage the TURBO mode - regardless of the settings - while you KEEP it pressed.

More on the thread below...

"To live or die by your own sword one must first learn to wield it aptly."
Find all posts by this user
Quote this message in a reply
05-29-2015, 08:04 AM (This post was last modified: 05-29-2015 08:16 AM by Ángel Martin.)
Post: #39
RE: 41C/CV root finders
(05-28-2015 06:33 PM)Dieter Wrote:  This sounds like there is something wrong with f(i) and/or f'(i). Could you post these two formulas here?

(05-28-2015 06:33 PM)Dieter Wrote:  ..... f(i)/f'(i) is the correction term, the mentioned "delta i". My 10-digit program quits if delta_i : i drops below 5E–8.

Are there really cases where f'(i) is less than 1? Usually f'(i) is of similar magnitude as the payments, i.e. around 100 or 1000. For the sample case I get values around 4000 or 5000. You seem to use a different definition of the TVM function and its derivative. Sounds interesting, so again I would like to ask for the formulas you use.

Not really, I approach this from a math standpoint and not a financial expert - which I'm not by any stretch of the imagination.

The formulas are posted below, but this is certainly strange - I need to revise the implementation, it might be something goofed up in the way I program them... the execution times were comparable to the 12C in the examples I tried so I assumed it was ok though.

f(i) as per the Advantage's manual:

f(i) = PV + (1+ip) PMT [ (1- (1+i)^-n) / i] + FV (1+i)^-n

Hence:

f ’ (i) = (PMT / i^2 ) * [ (1+i)^(-n) - 1 ] + n * [PMT (1 + ip)/i – FV ] * (1+i)^-(n+1)

where p=1 in Begin mode or 0 in End mode.

BTW the Source Code is also posted at TOS - so anyone with an inclination can have a look and help me find the glitch - it there's one ;-)

Çheers,
ÁM


PS.- You don't need the Library#4 for the TVM$ module - althought it doesn't hurt to have it always configured on V41 of course. You'll need it for the SandMath, SandMatrix and 41Z if you decide to venture there.

"To live or die by your own sword one must first learn to wield it aptly."
Find all posts by this user
Quote this message in a reply
05-29-2015, 05:54 PM (This post was last modified: 05-29-2015 05:56 PM by Ángel Martin.)
Post: #40
RE: 41C/CV root finders
(05-29-2015 08:04 AM)Ángel Martin Wrote:  ... but this is certainly strange - I need to revise the implementation, it might be something goofed up in the way I program them... the execution times were comparable to the 12C in the examples I tried so I assumed it was ok though.

Found a bug in the code that was the cause the number of iterations needed go beyond the needed ones, so now (after correction) both Begin and End cases require 6 iterations using a 1E-9 delta error, or just 4/5 using the 1E-8 criteria.

So I think this must have been the issue, thanks for your pointers and instigating support ;-)

Cheers,
'AM

"To live or die by your own sword one must first learn to wield it aptly."
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 3 Guest(s)