Posts: 1,216

Threads: 75

Joined: Jun 2011

Quote:

We await the new version.....

Well, it was not really a serious problem, i.e. it didn't return any wrong results. It was just so that the solver SLV didn't get the correct (intended) 2 initial guesses but some other meaningless values, so it may fail in some cases when solving for I.

But it seems that bug-fixing isn't always a goos idea. :-(

Now that I use the 2 correct initial guesses, _sometimes_ the solver fails because of a different problem: it produces values <= -1 for the internal interest rate during the SLV process, and so the financial equation stops with an error (because ln(1+x) is of course not defined for x<=-1.

Now my question: should I implement a test for i<=-1 and return NaN in this subroutine for SLV?

Can SLV handle such NaN 'results' and what would SLV do in this situation?

Franz