Programmer's Calculator V2.73 for the Palm OS

Using quoted expressions to define new functions

Let say we need a key to calculate the a secant which is defined as the reciprocal of the cosine of the angle, or 1/Cos(angle). First Hit the "?" key which allows you to enter an expression. You could, at this point merely type: 1/Cos(45) for example to calculate the Secant of 45. But for our purposes, lets say that you need to do this calculation a number of times. So, Enter the expression: Secant="1/Cos(Disp)". This sets the variable (symbol) Secant to the expression: 1/Cos(Disp). Now we could type Secant in the expression dialog to calculate the secant of what's currently displayed.

To assign our new function to a key so that we can calculate the secant quickly with one keystoke. Go to the Options menu, then select Key Reprogramming and enter Secant in the Function field and Sec in the Key Text field. Now press KEY12 to assign it to the 1st key of the second page of keys. Keys are numbered from KEY0 going across to the right is KEY2, etc to KEY23 which is the last key on the second page of keys.

Now hit the Program key and we now have a new key programmed with the secant function.

So if you enter 45 and press the new Sec button, we'll get the correct answer of 1.4142136.

I used a trigonometric function as an example but nothing prevents us from doing the same type of new function declaration using binary and boolean functions.