Table of Contents

Introduction Getting Started Basic Calculation Advanced Calculation Scripts Script Programming


Changes by Version


What is RPN?

RPN is an advanced and highly customizable postfix calculator for scientific, engineering, and financial calculations. Please purchase RPN if you find it useful.

Major Features


  • Postfix
  • Graphing
  • Solving
  • Programmable
  • Recordable

  • Hi-res interface
  • Customizable colors

  • Scientific and engineering functions
  • Conversion functions
  • Many format and base options
  • Script editor

  • No need for MathLib
  • Palm OS 3.1 or later
  • High precision
  • 100k in size

Cost and Registration

There are two levels at which to purchase RPN:

RPN Coweb

The RPN Coweb is an online, structured discussion forum for all RPN customers to benefit from and contribute to. Click the link above to view the coweb.

Everyone can read the coweb contents. If you Join the Coweb, you can edit every page of content to help create the most adaptable and structured record of RPN information possible including uploading your own scripts.

Getting Started

Getting Oriented

Postfix Calculations

The basic idea of a postfix or revese polish notation calculator is that all operations take their arguments from a stack; which means, all numbers required by an operation are entered before the operation is selected. The stack is a storage area for numbers. The last value added to the stack is called the top of the stack (tos) and is the first item available when the stack is accessed. Note: RPN shows the stack building upwards from the input line.

Rather than debate the benefits of this calculator style, I'll show a few examples. Note that operations "enter" the current input, so an 'enter' is not needed before an operation. (see the first example).

         4+2 --> 4 enter 2 enter + --> 4 enter 2 +
         (12+sin(7))/(11*3.1415) --> 7 sin 12 + 11 enter 3.1415 * /
Other Sources:
HP's RPN Tutorial

Unlike some postfix models (such as 4-level RPL by HP), in RPN what you see in the display always represents the top part of the stack. This model is more obvious to most people and was used in the HP-28 and HP-48 series of postfix calculators.

Stack and Input Area

stack and input The stack is displayed moving upwards in the upper left area of the screen. Just below the stack is the main input area (also to the left of the delete button). The input area is where you build up numerical input; when there is no numerical input the input area is used to display the first stack value.

Script Area and Button

script area The script area in the upper right corner of the display is fully customizable and dedicated to providing user input to RPN's powerful scripting language, RPN-Code. Each script controls this portion of the RPN screen to display a set of buttons which execute the RPN-Code defined for them. RPN includes a number of standard scripts to calculate trigonometric functions, logs &powers, unit conversions, etc. Users can easily create their own scripts or download scripts written by others.
script button You can scroll through the scripts using the scrolling keys on your device or pick a script from the popup list presented by tapping the script button which pops up a list of the installed scripts. Choose one and it will become the current script which is displayed in the upper right hand corner. Note, you can also scroll through the installed scripts using the page up and down keys on the device. See Built-In Scripts for an overview of each script that comes with RPN.

Recordings Button

RPN can record calculations you preform. Think of this feature like a 'watch and learn' way to build a calculation for later playback. Simply start the recording, perform the actions of your calculation, and then stop the recording. Recorded equations can then be played back, graphed, or solved (solving takes place inside the graphing dialog).

record button
Begins recording all calculations, overwriting the last recording. Note, if you'd like to record a function that takes one input value, then you should put a value on the stack before recording since the input is not part of the function.
Stop the current recording.
Playback the current recording.
Graph the current recording. Note, the recording needs to take one input and produce one output.

Specify a name to save the current recording under (requires Palm OS 3.5 or later).
Choose a previously saved recording to load.
Choose a saved recording to delete.

Drag and Drop

screenshot Dragging items around with the pen is a common shortcut to many RPN operations and in some cases the only way to use some features. To drag, tap a draggable item and, without lifting the stylus, drag that item to its destination and lift the stylus to drop. In the illustration, the blue areas are draggable items, while both the blue and red areas can be the destination of a dragging action. The most important operations are listed below (though you may discover others):
Store and recall of values
To store a value, drag the value from the stack to one of the number buttons (0-9). Later you can drag the value back out of the number button and into any visible stack position.
Perform operations on values
Drag a value (either from the stack or a storage location) and drop it onto any single argument operation (locations shown in red above).
Undo the last operation
Drag the delete button to the main input area (just to the left).
Reorganize the stack
Drag a value from one stack position to another. Hint: tapping a value will move it to the top of the stack.
Duplicate a value
Drag a value to the 'Enter' button to copy it to the top of the stack.
Delete a value
Drag the value from the stack to the 'Delete' button.

Menu Commands

There are several ways to get to the menus in RPN. You can use the menu button (usually located in or near the Graffiti area), the menu key on devices with keyboards, or simply tap the top-left corner of the display (it's easiest to tap all the way in the corner at the edge of the screen itself).

stack menu
Drop All
Clear the stack.
Last Stack
Return the stack to previous state. Shortcut: Drag 'Delete' button to input area.

( x --> ) Delete the top stack item. Shortcut: Drag value to 'del' button.
( x y --> y x ) Move the 2nd stack item to the top. Shortcut: Tap the second stack item.
( x --> x x ) Duplicate the top stack item. Shortcut: Tap the top stack item.

( x y --> x y x ) Copy the 2nd item to the top of the stack. Shortcut: Drag value to 'Enter' button.
( x y z --> y z x ) Move the 3rd stack item to the top. Shortcut: Drag value to top of stack (input area).

script menu
Open the script editor and start a new script.
Open the script editor and load the RPN-Code for the current script. If you change the title of the script in the RPN-Code that changes which script you are editing. Note: If you defined the script in a previous version of RPN you will need to reinstall your source either by simply pasting your source into the script editor.
Delete the current script.

Move the current script to the beginning of the list of scripts.
Move the current script to the end of the list of scripts.
Make the current script Xth in the list of scripts where X is the number on the stack.

Reinstall All...
Reinstall the default scripts; you will be asked to confirm any replacement of current scripts.
Key Shortcuts...
Define shortcut keys for common buttons using the "Key Shortcuts" dialog. All input mechanisms are treated the same so you can define Graffiti and keyboard based shortcuts using the same dialog.
Script Shortcuts...
Edit a special script (titled #keys#) that contains subroutines to be mapped to key shortcuts. The subroutines cannot reference each other or any global variables. For instance, to define a shortcut for the 'c' key you would put the following code into the script:
[c] code ;

extra menu
Displays information about RPN.
Toggle the help mode ON and OFF. When help is on tapping a script command will display its help string though not all scripts have help strings.

Copy a single number from the stack to the clipboard.
Paste a single number from the clipboard onto the stack.

Open the format modes dialog box.
Set Colors...
Set the colors used for the main display.

Using Graffiti or Keyboard

Most keyboard and Graffiti actions do the obvious thing. For instance entering '+' is the same as pressing the Addition button. The least obvious shortcut is that entering a space is the same as pressing the +/- button (this is because the Graffiti stroke for space looks like a minus).

Basic Calculation

Entering Numbers

Numbers can be entered using fixed, scientific, or engineering notation regardless of the current display mode. Pressing the EEX button will add the scientific part to the number, while the change sign button (+/-) will change the signing of whichever part of the number you are editing. Pressing the delete button while editing numbers deletes just the last digit of the number.

Pressing the EEX button to start a new number will automatically begin the number with "1e", which simplifies entering numbers like 1e6.

Formatting Numbers

Choosing Modes... from the Extra menu or tapping the left side of the input line (around the trig mode display) will bring up the following dialog where you can define how numbers are formatted for display:

options dialog
Trig Mode
Which units are used for degrees.
Comma Mode
Which character to use for the comma separator. The decimal separator will adjust automatically.
Number Mode
Which format to use for numbers.
How many places to show after the decimal point. Tapping Places allows you to choose from common options.
What numerical base to use for numbers. Tapping Base allows you to choose from common options.
Show Trailing Zeros
Set whether extra zeros after the decimal point are shown. (example: 1.0100 vs. 1.01 both with Places set to 4)

Performing Calculations

Calculations are preformed by pressing buttons in the main display, choosing scripts in the script area, or entering key shortcuts via Graffiti or the keyboard. All calculations happen immediately and operate on the currently visible stack. In this way, postfix calculation is more immediate and separate from numerical data than infix or algebraic computation.

Built-In Scripts

The built-in scripts are installed when you frist run RPN and appear in the upper-right of the RPN display. You can page through scripts with the scroll buttons on your handheld or select a script using the script popup button, the button with a little triangle on it (just above the Enter button). The usage of each built-in script is described below (only the more complex operations are covered in detail):



A collection of trigonometric functions and operations.

( deg --> deg* )
Presents you with a dialog to choose between converting to radians, degrees, or into the current mode of the RPN display.
( x --> f(x) )
Choose between various hyperbolic trig functions.

Logs &Powers


Logorithmic and exponential operations.

( N --> )
Set the value for N used in the next two functions.
( X --> N^X )
N to the power of X
( X --> logN(X) )
Take the base N logarithm of X.



Over 400 conversions of various units.

mass, temp, len, area, vol
( unit1 --> unit2 )
Choose two units and a conversion from the first into the second is made.
( unit1 --> unit2 )
Repeat the last selected conversion.
( unit1 --> unit2 )
Reverse the last selected conversion.



Do calculations in different numerical bases.

( base --> )
Set the displayed base to any value in [2, 32] (the display can get a bit confusing in bases greater than 16 if you aren't used to it): 2 = binary, 8 = octal, 16 = hex.
+, -, *, /, ,|, ^
( Y X --> b(Y,X) )
Basic binary operations.
<, >, ~
( X --> u(X) )
Basic unary operations.
( --> )
Enter Hex digits A-F if you are in a base which supports them (greater than base 10 obviously).



With this script you can do arithmetic on time values and use clock and stopwatch features. All calculations are done in h.mmsstt format; meaning time is packed into parts of a decimal number so that 12 hours, 4 minutes, 29 seconds, and 30 ticks (1/100th sec) would read 12.042930.

( --> current_time )
Report the current time.
( --> )
Start the stopwatch.
( --> elapsed )
Report the elapsed time since the last Start without stopping the stopwatch.
( h.mmss --> )
Set a countdown alarm. The alarm can be Off, Running &Shown, or Running &Hidden. If the handheld is on and this script is visible then an alarm will go off when the timer completes. Note: this timer will not turn the haldheld on when it goes off, but it will continue when you come back to the Time script even if you change applications.
/, x
( timeY X --> b(timeY,X) )
Divide or multiply in time format. Note: X is a regular number not a time.
-, +
( timeY timeX --> b(timeY,timeX) )
Subtract or add in time format.
( h.mmss --> decimal_time )
Convert from h.mmss to decimal time format.
( decimal_time --> h.mmss )
Convert from decimal to h.mmss time format.
( time --> shifted_time )
Shift decimal places 2 places to the right.
For instance, to enter 47 seconds: tap(4, 7, >>, >>)



Time value of money (TVM) calculations are done using 5 main variables: present value of money (pv), effective interest rate (i), payment amount (pmt), number of periods (n), and future value of money (fv). If you know 4 of these values, then this script allows you to solve for the 5th one.

Note: The interest period and payment period is the same in these calculations to simplify the interface; you will have to convert your payments and interest into the same period.

Note: If the interest rate is zero then you should just use the obvious calculations. Solving for extremely small interest rates (below .0001%) is not supported in this version.

Note: Interest is entered and reported in decimal form, so that 6% interest is 0.06

Note: As usual in these calculations, money you have is positive and money you don't have is negative.

Short Example:
Let's say you want to invest $1,200/year for 10 years and need $40,000 at the end of that time to build your very own robotic pirate. How much interest are you going to need to earn on your investment?
tap(mem, clear), -1200 tap(set, pmt), 10 tap(set, n), 40000 tap(set, fv), tap(calc, i) = 25% interest/yr!
Let's say you're willing to start with $10,000.
-10000 tap(set, pv), tap(calc, i) = 8.3% interest/yr. Now that's a more likely way to acheive your goal.

( --> )
Set the modes of TVM calculations using dialogs. You can specify when payments are made in the period and whether calculated values automatically are set after calculation.
( i --> i* )
Convert between Nominal and Effective interest.
( --> )
Save, recall or clear all the TVM settings and values.
( --> varies )
View one or all of the 5 stored values.
( varies --> )
Set one or all of the 5 stored values. To set all you need to put them on the stack in the order listed in the 'set' dialog.
( --> result )
Calculate one of the 5 TVM values using the other 4 stored values.



Miscellaneous functions.

( Y X --> Y%X )
Remainder after dividing Y by X.
( X --> ip(X) )
Integer part of X.
( X --> fp(X) )
Fractional part of X.
( X --> !X )
Factorial of X.
( Y X --> Y Y(X/100) )
Take X% of Y, leaving Y on the stack.
( Y X --> delta(Y,X) )
Percent change of Y becoming X.
( ... --> stdDev mean sum N )
Calculate statistics about the list of numbers on the stack.

Undoing Actions

You can undo the last actions effect on the stack by choosing Last Stack from the Stack menu or by dragging the 'Delete' button to the input line (which is directly to the left of the 'Delete' button). Note: effects on variables in scripts are not undone.

Advanced Calculation


Also see recordings button and the next section for a Graphing discussion.

The sequence of actions to make a recording for the function f(x) = x*x + 7 is given below:

  1. Enter a starting value and press enter. Note, the starting value is not part of the recording since you want the recording to operate on any value from the stack.
  2. Select 'Record' from the 'Recordings Button'.
  3. Press 'Enter' to duplicate the value.
  4. Press the 'Multiply' button.
  5. Press the '7' button.
  6. Press the 'Add' button.
  7. Select 'Stop' from the 'Recording Button'.


Once you have recorded a function that produces a value for Y (see above), RPN will graph and solve it by supplying values for X and then runing your recording. Select 'Graph/Solve' from the 'Recordings Button' to view the graph. To return to the main calculator display simply tap the 'Done' button.

graph dialog

Axis Tools

Found along the top of the display, the Axis Tools allow you to adjust the graph view with a single tap:
Manually set the bounds.
Zoom-In by 2x.
Zoom-Out by 2x.
Adjust the view so the graph fits.
Go to the home view [-1, 1].

Pen Tools

At the bottom of the display, the currently selected Pen Tool determines what happens when the pen is drawn over the graph:
Probe - f(x)
Tracks the pen in the graph and displays values.
Drag out a rectangle and the graph will zoom-in to that view.
Drag the pen to move the graph within the view.
Choose a point on the graph to center in the view.


The probe tool displayed beneath the graph is used for solving as well as the reporting values. When the = button is pressed, RPN attempts to find an x value for the function graphed that equals the number in the field to the right of the button.

Within the graph display you can solve for the x-value corresponding to a target y-value:
  1. Display a portion of the graph where the desired solution exists.
  2. Allowing RPN to graph all the points may increase the success of solving.
  3. Write the desired value in the field to the right of the = button.
  4. Press the = button.
  5. If valid starting conditions are found, RPN will display the result to the left of the = button.


What are scripts?

RPN is programmed in a language called RPN-Code. Each script presents its own interface (the buttons in the upper-right in RPN) and is defined by loading RPN-Code written using the built-in script editor or an external editor.

Navigating Installed Scripts

There are three ways to navigate between different scripts:

Finding and Installing Scripts

The best place to find scripts is the RPN Coweb . Once you've found a useful script database simply hotsync it to your device. The next time RPN is run it will be imported. In order to see that it is installed you may need to navigate to it.

Managing Scripts

You can change the order of scripts and delete unwanted scripts using the Script Menu.

Script Programming

Open the scripting manual.


Next On Stack. The second value on the stack.
The language used to write RPN scripts.
stack gauge
The vertical bar between the stack and script areas which indicates how full the stack is.
Top Of Stack. The first value on the stack.

Changes by Version

Version 3.61 -gt; 3.62 changes: Version 3.60 -> 3.61 changes: Version 3.55 -> 3.60 changes: Version 3.51 -> 3.55 changes: Version 3.50 -> 3.51 changes: Version 3.22 -> 3.50 changes: Version 3.21 -> 3.22 changes: Version 3.20 -> 3.21 changes: Version 3.10 -> 3.20 changes: Version 3.05 -> 3.10 changes: