Menu

#94 Solver will not operate correctly w/ if()

open
nobody
None
5
2007-11-07
2007-11-07
Anonymous
No

Solver will not work with equations containing the if() function. This can be circumvented by embedding the if() in a defined function. However, although the defined function works correctly in solver under most circumstances, it does not work when the "steering" variable is the "undefined" solve variable.

Define function (broken up for clarity):
eint()="if(x(2)>0:
100*((1+x/100/x(2))^x(2)-1):
100*(exp(x/100)-1))"

In solver:
effint=eint(nomint:nperyr)

solving for effint and nomint work correctly, solving for nperyr returns "Impossible Calculation" message.

Free42 will solve correctly under the same conditions.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.