05-20-2015, 07:07 PM

I threw together a TVM program - mostly a conversion of the 32S one I did recently, with some local alpha label and flag 22 tricks to make it imitate a 12C - and I'm at the point where I need a numeric solver to compute i%.

I've played around with integrating two different solver routines:

Equation Solver for the HP-41C/CV/CX

Root Finder for the HP-41C/CV/CX (From the Standard Applications module.)

Both of them seem to deteriorate in various ways if the initial guesses aren't very good, given how rapidly the TVM equation starts to grow as i% increases, along with regions where certain subexpressions can be undefined. The first one seemed not too bad if supplied with fairly accurate initial guesses.

Does anybody have any recommendations for good root finders, or techniques for obtaining initial guesses for i%? I know the Advantage module has a general purpose solver that's based on the 15C, but it's also got a TVM solver, which would eliminate the point in writing my own anyway.

I've played around with integrating two different solver routines:

Equation Solver for the HP-41C/CV/CX

Root Finder for the HP-41C/CV/CX (From the Standard Applications module.)

Both of them seem to deteriorate in various ways if the initial guesses aren't very good, given how rapidly the TVM equation starts to grow as i% increases, along with regions where certain subexpressions can be undefined. The first one seemed not too bad if supplied with fairly accurate initial guesses.

Does anybody have any recommendations for good root finders, or techniques for obtaining initial guesses for i%? I know the Advantage module has a general purpose solver that's based on the 15C, but it's also got a TVM solver, which would eliminate the point in writing my own anyway.