Published on by

HP12c solver for polynomial expressions

HP12 Polynomial solving.

From Valentín Albillo’s “Serendipitous Solver” article. I have not read it from a long time ago, but I got struck by it sheer originality. The HP12c is maybe the perfect financial calculator, but it is quite limited when it comes to scientific purposes. It misses trigonometric functions, integration, solver…

Does it really miss a solver? It does miss a generic solver, but it does have a solver for the NPV calculation. What the calculator does it trying to solve the NPV equation for r: getting the internal rate of return (IRR)


NPV: Net Present value
CF(i): net cashflow at  i period
r : discounting rate

but if you replace  1/(1+r) = x, you have a polynomic function in x. You can now find the zeroes of the function. You just have to enter the coefficients as period cashflowsand the constant term, and solve for interest i. Careful with the monthly/yearly equivalences! . Then you just have to find X substituting again. Be careful of the discontinuities that may happen when i crosses zero. Now, the calculation will give you a zero; you need to play with the initial values of r to find others.

This of course might be done easier with the HP15c – where you just need to enter the polynomic expression as a RPN program and then apply the generic solver. No need to do substitution. 

Comments: 0
More about: HP12c, HP15, polynomics

Only registered users may post comments.
Sign in and post comment Register now