FMRR%~IRR%:0*(IF(G(P\YR)=0:L(P\YR:1):0)+ L(Z:--(G:1:SIZEC($):1:#T($:G)))+L(N:L(F:L( M:L(W:0))))+--(G:SIZEC($):0:-1:--(T:#T($:G) :1:-1:L(M:G(M)+FLOW($:G))+ IF(G(M)<0:L(M: G(M)*SPPV(SAFE%/G(P\YR):MIN(G(Z)-G(N):1)) ):L(W:G(W)+G(N))+L(M:0)))+L(F:G(F)+IF(G=0 :0:FLOW($:G))*SPFV(G(IRR%)/G(P\YR):G(N))) +L(N:G(N)+1))))+IF(S(FMR%) OR S(SAFE%) OR S(RSK%):0*(SAFE%+RSK%)+G(M)*SPFV(FMR%/G( P\YR):G(Z))+G(W):IF(S($MIN):$MIN-G(M):IF( S($FW) OR S(P\YR):$FW-G(W)+0*P\YR:FLOW($: 0)*SPFV(IRR%/P\YR:G(Z))+G(F))))

To convert this equation to something that is both humanly readable and usable in HP CALC/Solve, I recommend that you use an ASCII text editor such as VDE or QEDIT to key in the text from the book. MEMO might work as well, but on some 100/200LX machines MEMO may introduce stray characters into the text, especially if you use the TAB key. When you try to cut and paste the equation from MEMO into the Solver Editor screen, you risk the chance of causing the machine to lock up.

You'll need to make some modifications to this equation for use the Palmtops. For example, the HP 19B-II uses "P/YR" as a variable name. However, HP CALC will interpret "P/YR" as "P" divided by "YR". So, use "P\YR" instead. Likewise, use "/" in place of the 19B-II's division symbol. Change the character you used for sigma to the actual word "SIGMA". Then reformat the text file so the lines extend across the screen and don't wrap around to the next line. For readability try to end each line with the symbol for a math operator, such as "+" or "*" or ":". You may remove the leading "^PFMRR%~IRR~:". Then, look for the words "FLOW", "SIZEC" and "#T". On the HP 19B-II these words represent functions that refer to a CFLO file. The FLOW(1) operator returns cash flow number 1 from a CFLO file. SIZEC() returns the size of the cash flow list and #T(1) gives the number of cash flows in the first group.

It would be great if the comparable functions worked consistently on all versions of the HP Palmtops. Unfortunately they don't. The HP 95LX version of CALC/Solve doesn't support these functions at all. According to HP's technical support the HP 200LX does not have the following problem. (HP 200LX users can try an alternative 200LX only version of the FMRR equation, FMRR-CFL.EQN .) However, I discovered that the HP 100LX Solver does not support the SIZEC(), FLOW() and #T() functions when they are used repeatedly in the same calculation, i.e. within the sigma function. (The Stat List functions on the 100LX also have the same problem.) Each time one of these functions is used it opens and does not close the CFLOW list file. So, when used repeatedly in a calculation the number of open files set by DOS may be exceeded. Then a message appears telling you that too many files are open. From that point on the 100LX can neither save nor open any files. The only recourse is to reset the machine, thereby losing whatever data may still be in memory.

The work around is relatively easy and even has some advantages. For consistency and reliability, it's preferable to use a Lotus 123 worksheet to hold your cash flow list rather than a CFLOW.CFL file (i.e. data file for the 100/200LX Cash Flow application). That will insure that the solution will work on the HP 95LX/200LX and will avoid any bugs in the 100LX. It also has the advantage that a single worksheet can hold several different cash flows and you won't have to modify the solver equation or rename .CFL files. Using Lotus will require some changes to the equation. Wherever the HP 19B-II code calls for a SIZEC() function, substitute LENGTH(CFLOW). Likewise, substitute RCLCELL (CFLOW,G,1) for FLOW() and RCLCELL(CFLOW,G,2) for #T(). We also have to adjust some of the values in the SIGMA() functions to account for the differences in how RCLCELL() and FLOW() handle "offsets".

So, without further ado, here's the final version of the FMRR Solver equation in a format that's suitable for the HP 95LX or the HP 100/200LX. The file is available on the Palmtop Paper On Disk in a file called FMRR123.EQN . This file does not contain any of the comments.

If you want to key it in yourself, use any text editor other than MEMO to enter the text. The text enclosed in exclamation marks is commentary and should not be keyed in. Save the file and import it into a note field in NoteTaker. (Memo has a habit of inserting strange characters which can be disastrous to Solver.) Then use COPY and PASTE to put the equation in an HP Solver editing screen. If you key it directly into Solver don't use the French brackets, { }, at the beginning and end of the equation.

**The FMRR solver program**

As mentioned, comments within exclamation marks (!) need not be entered. Carriage returns and indents of Solver code is for readability only and does not affect the functioning of the equation in Solver.

{0*(IF(G(Pmts\Year)=0 !This insures that Pmts\Year will! :L(Pmts\Year:1)
!not be zero! :0)+

[Note: My first attempt at developing a solution for FMRR was based on a program from a 15 year old programming book. In case you're interested in a very fast solution, I've included the compiled program and the Pascal source code on this issue's Palmtop Paper On Disk. The file is called FMRRPROG.ZIP . The file contains a documentation file as well as a worksheet and several data and report files.]