The HP Calculator Specialist

Published on by JGD
# Customizing the HP Prime

We have discussed already how the hp Prime can be adapted for financial use. You can search the blog for these settings, Here and Here.

- in a past blog we have discussed how can we mimic the “business” menu of the HP 17bII - and it is quite efficient to operate.

- we have discussed as well how to copy (and in this case, improve) the currency exchange menu of the HP17bII+ (This was a feature that did not exist in the original Pioneer calculator)

- Now we will try to get an immediate version of the above, not using the solver but applying functions to stack numbers.

The HP Prime has among its functions the %, %CHANGE and %TOTAL functions, but when you’re searching for the function in the catalog, you might as well do the calculation yourself, applying the formula directly instead. What we’re after is to get a convenient way of using these functions.

Please be aware that we will set it up for RPN.

The HP Prime has the possibility of defining most of its keys, and activate this re-definition with a “user keyboard” key. However, it is less nice to use than the ASN function found in the HP41c family. You actually need to create a program for that. And, as all programs in Prime, it can take as many stack arguments as needed, but can only deliver to a single stack level: you cannot deliver output to several stack levels.

There is a specific start of the program that tells the prime which is the key that has been reassigned. You can see all the key codes in page 518 of the user manual.

For the sake of our discussion, (and because it is the way I have set mine!) let’s assume that we want to assign % to Sin, %CHANGE to Cos, and %TOTAL to Tan. This is, by the way, the same order you can find in many hO calculators.

The program should look like this:

KEY K_Sin))

BEGIN

RETURN “ %”;

END;

And that’s it. The space before the % sign serves to separate from the number just written, so that you don't need to press enter before. So, you just need to enter the first number, ENTER or space, the second number, the Sin key and enter (that last part I couldn't avoid).

You can down the same with the other two keys. You just need to start with KEY K_Cos)) and KEY K_Tan)). It is faster to use than the solver method, although less adapted to “what if” reasoning. It also operates like the hp48 family: it consumes its arguments, while the “real” financial calculators keep the number in the Y register, and you can reuse it by clearing the screen with clx, therefore disabling the stack lift. As I never liked the hp 48 method, I am disappointed because I have not managed to do it the way it should be; but it is better than nothing, isn't it?

I look forward to program the NPV and IRR functions!

Comments: 0

More about:
HP prime
Only registered users may post comments.

Sign in and post comment
Register now