New: Where's the menu key? See the FAQ
This is a basic scientific RPN calculator. It's a powerful scientific calculator with many popular features.
This is an RPN calculator. If you don't know what that means, or are not a fan of RPN, stop now; this is not the calculator for you.
Version 2.0 is now released. This is a complete re-write based on the RpnCalc Pro code base. This new version has a menu which allows you to switch between full scientific mode and basic mode (with easier to touch buttons).
Version 2.0 also features built-in help, and copy-and-paste of the X display.
Version 2.0 has improved appearance, especially on larger devices such as the Verizon Droid.
To access copy-and-paste, press and hold the X display just as you would on any Android text widget.
In general, enter numbers using digits,
Use the f button for shifted functions.
The calculator uses a 16-level stack. The top four levels are labeled X,Y,Z,T and are shown on the display.
There are 10 memory registers, plus some registers used for statistics. The STO and RCL buttons can access the memory registers. The ∑ buttons write to the statistics registers.
News and updates available by following @RpnCalc on Twitter.
If you're already familiar with RPN, feel free to skip this section.
In a nutshell, Reverse Polish notation means that calculator functions are performed as soon as you command them. With RPN, you enter two numbers, press +, and the addition function is executed immediately. In contrast, an algebraic calculator remembers that you pressed + and executes it later, when you press =. If you were to enter "1 + 2 × 3 =" into an algebraic calculator, the addition would not occur until the very end.
Because of RPN's "do what I say" approach, the "=" key and parenthesis keys would be superfluous. RPN calculators do have an "ENTER" key, on the other hand, to seperate one numeric entry from another.
As a practical example, let's look at the "1 + 2 × 3" example from above. Instead of entering the expression as it's written, we calculate it the way we would actually solve the problem with pencil and paper. That is, first we would multiply 2 and 3, then we would add 1.
On an RPN calculator, the process would be to first enter the value 2 with the key sequence 2 ENTER. Next, we would multiply by 3 with the sequence 3 ×. Finally, we would add 1 with the sequence 1 +.
This may all seem a little confusing to someone who is used to the algebraic style of keyboard input, but after a little use, you will come to find RPN to be a more intuitive interface.
In short, RPN works the way your brain actually works, not how you write things down on paper.
A point to ponder: algebraic calculators actually use a mixture of algebraic notation and RPN. For two-number functions, like addition, an algebraic calculator uses algebraic notation, while for one-number functions like square-root or 1/x, you find yourself using RPN. For example, an algebraic calculator computes square roots by first having you enter the number, and then pressing the √ key.
How would you compute √(4²+3²) on an algebraic calculator? Damned if I know, and I bet you don't know either without looking it up. Maybe it's in the manual. Either way, I guarantee it's really a mixture of algebraic and RPN.
(With an RPN calculator, you do it just the way you would do it on paper: compute 4², compute 3², add them together, take the square root.)
The stack is a storage area within the calculator that holds values until they can be processed. Both algebraic and RPN calculators have stacks, but RPN calculators expose the stack to the user.
The stack in RpnCalc and RpnCalc Pro holds sixteen numbers. The most recent four numbers are shown on the display and known as X, Y, Z, and T, with X being the most recent.
Try it: Key in a number and then press the ENTER key. See that the number you entered as X has been copied to Y. When you enter another number, it becomes the new X value. Press ENTER again. Now you'll see that Y has been moved to Z and X has been copied to Y as before.
Key in yet another number and press ENTER again. Now, the old Z value has been moved to T, Y has been moved to Z, and X has been copied to Y.
The display might now look like:
T: 123.00 Z: 456.00 Y: 789.00 789.00
If you keep entering numbers in this way, the stack will fill up with data, with the most recent data always in the X display. This process is known as "pushing" the stack, since each new value pushes the previous values deeper into the stack.
You can review the contents of the stack by pressing the R↓ key. After you've pressed this key sixteen times, the stack will be back to where it was.
Two-number functions, such as + take the most recent two numbers (X and Y) from the stack, perform the operation on them, and place the results back onto the stack as X.
Because two values were replaced by one value, the stack is then "popped", with older values making their way back to the front of the stack.
Try it: we'll re-visit the "1 + 2 × 3" problem, but this time enter the numbers in the order they appear. Since adding 1 to 2x3 is the last thing to happen, the value 1 will sit in the stack until the end.
|You enter||The display shows||Notes|
|Clear the stack|
|X = 1|
|X pushed to Y|
|X = 2|
|Stack pushed again|
|X = 3|
|X receives 2×3; stack is popped.|
|X receives 1+6; stack is popped.|
3+7² ———— 8+5
On paper, you would first find the value 7², then for 3+7², then the value for 8+5, and then divide them. With RPN, we do the exact same thing.
|You enter||The display shows||Notes|
|3 ENTER||T: 0.00
|First value entered|
|X = 7|
|f X²||T: 0.00
|X receives 7²|
|X and Y are added|
|8 ENTER||T: 0.00
|8 entered, previous value pushed into stack.|
|5 +||T: 0.00
|X receives 8+5|
|And finally, we divide.|
On paper, you would first find 4², then 3², then add them together, and finally take the square root. With RPN, we do the exact same thing.
|You enter||The display shows||Notes|
|4 f X²||T: 0.00
|3 f X²||T: 0.00
Note that we never even used the ENTER button. The ENTER button's main purpose is to seperate two numbers that are being entered one right after the other, but that wasn't needed here.
|f||Used to access the shifted functions (displayed in orange.)|
|0…9 .||Data entry|
For example, for |
|EEX||Exponent for scientific notation. For example, key 1 . 2 EEX 9 for 1.2×109 (1.2 billion.)|
|Note: the CHS key can also change the sign of the exponent. For example: 1 . 2 EEX 9 CHS will enter 1.2×10-9|
|ENTER||Enter current value, pushing it onto the stack and making the calculator ready for a new value.|
|←||Clear last keystroke during data entry; clear X register otherwise.|
|Last X||Recall most recent X value|
|X↔Y||Swap X,Y values|
|R↓||Rotate stack down|
|+||Add X and Y|
|-||Subtract X from Y|
|×||Multiply X and Y|
|÷||Divide X into Y|
|MOD||Compute Y modulo X|
|√x||Compute square root of X|
|x²||Compute square of X|
|ex||Compute e to X power|
|10x||Compute 10 to X power|
|ln||Compute natural log of X|
|log||Compute log base 10 of X|
|yx||Compute Y to power of X|
|SIN||Compute sine of X|
|COS||Compute cosine of X|
|TAN||Compute tangent of X|
|ASIN||Compute arcsine of X|
|ACOS||Compute arccosine of X|
|ATAN||Compute arctangent of X|
|INT||Return integer part of X|
|FRAC||Return fraction part of X|
|n!||Compute X factorial|
|Display and Data Modes|
|SHOW||Show the current X value in full precision.|
|BIN, OCT, DEC, HEX||Change base. See below for more information about hex mode.|
|FIX, SCI, ENG||Set fixed-point, scientific, or engineering notation. Choose a display mode and enter a single-digit precision, e.g. FIX 2|
|DEG, RAD, GRD||Switch between degrees, radians, and gradians|
|STO||Enter a digit in 0..9 to store
X to a memory register. Enter
. and a digit to store to registers 10-19.|
Example: STO . 5 will store X in register 15.
|RCL||Recall specified register|
|STO +||Add X to a memory register|
Example: STO + 2 will add X to register 2.
|STO −||Subtract X from a memory register|
|STO ×||Multiply X to a memory register|
|STO ÷||Divide X into a memory register|
|RCL ∑+||Recall specified statistics registers. This may recall one or two values, depending on the registers you choose.|
|%||Compute X% of Y [X = X*Y*.01]|
|Δ%||Compute percent change from Y to X [X = 100*(X-Y)/Y]|
|→P||Rectangular to polar; convert X,Y to R,θ|
|→R||Polar to rectangular; convert R,θ to X,Y|
|→H||Hours.mmss to hours|
|Example: How many hours is 2:20:33?|
Answer: 2.34 hours
|→HMS||Hours to hours.mmss|
|Example: What is 1.8 hours in hours, minutes,
Hint: Use SHOW to see all the digits.
|→RAD||Degrees to radians|
|→D||Radians to degrees|
|P(x,y)||Return number of permutations of X items from a population of Y|
|Example: How many ways to draw three marbles
from a sack of 8?|
|C(x,y)||Return number of combinations of X items from a population of Y|
|Example: Same as above, but the order doesn't
|∑+||Add X,Y to statistics registers|
|∑−||Subtract X,Y from statistics registers (this is the best way to 'undo' ∑+)|
|c∑||Clear statistics registers to zero|
|x||Return mean X,Y values to X,Y registers|
|σ||Return standard deviation of X,Y|
|L.R.||Linear Regression: return slope and intercept|
|y,r||Linear Estimation: Compute f(X); confidence value returned in Y|
|x,r||Linear Estimation: Compute f-1(X); confidence value returned in Y|
If your Android phone has a keyboard (such as the G1, Samsung Moment, or Motorola Droid), then keyboard keys can be used as shortcuts for certain buttons.
The digit keys, and decimal point keys on your keyboard correspond to the same buttons on the calculator. Likewise, the +, -, *, / keys represent the +, -, ×, and ÷ buttons. The E key represents EEX.
In hex mode, the A through F keys enter hex digits.
|0…9||0 … 9|
|C||CHS (change sign)|
|+ - * /||+ - × ÷|
When in hexadecimal (or binary or octal) mode, the meaning of a few of the buttons and keys change. In particular, you will note that the top row of buttons have been relabeled with the letters 'A' through 'F'. While in hex mode, the math functions previously associated with those buttons will not be available.
Likewise, the 'A' through 'F' keys on the keyboard will enter the corresponding hex digits.
In particular, the 'F' key is no longer available as a shortcut to the f calculator button. This will probably cause you some confusion the first few times you try to use f DEC to return to decimal mode. However, you should quickly get used to using the f button on the screen instead.
Q: How do you set the number of decimal places?
A: Use f FIX, f SCI, or f ENG to set the display format and number of decimal places.
Q: How do I turn keyclick on?
A: Through the menu. Go to Menu > Preferences.
Q: Why isn't TAN(pi/2) an error?
A: Good-old fashioned round-off. No calculator can store an exact representation of pi. This means that TAN(pi/2) will be a very large number, but not an error. A real HP calculator behaves the same way.
Q: The bottom row of buttons is partly obscured on Blackberry Playbook
A: That's the Android navigation bar. Dismiss it by touching the little icon at the extreme lower-right of the screen.
While we're on the subject of Android on the Blackberry Playbook, here are a couple new gestures worth knowing: Swipe down from the top of the screen to get the RpnCalc menu. Swipe up from the bottom of the screen to minimize RpnCalc and navigate to other applications. Swipe diagonally up and to the left (or right) from the bottom of the screen to go "back" one level, just like pressing the "back" button on Android.
Q: I can't get this app to download.
A: Several people have reported this problem. It's a known bug in the Android Market and affects many, if not all apps. It's not specific to RpnCalc.
A: Many people who have trouble installing apps from the market have reported that if they log onto the Google "Talk" application, the problem goes away. It doesn't make any sense, but there you have it. Give this a try before reporting problems.
If you still have a problem, contact me with a detailed description of the symptoms.
Q: How do I switch from scientific mode to basic and back?
A: The device's menu lets you switch between the calculator's various operating modes. It also lets you bring up the built-in help pages.
Q: Where is the Clx button?
A: Replaced by the ← button, which is better. The ← button deletes one character when you use it during data input, and acts like the old Clx button the rest of the time.
Q: Can you make it display commas between the digits?
A: It should be doing that already provided your system locale is set properly, but there seems to be a bug on the Motorola Droid device which we're looking into now. If you see this on anything other than a Droid, please write to us.
RpnCalc can be launched with the "org.openintents.action.CALCULATOR" intent. When the user exits the calculator, the final X value will be a double value in the extras "X" entry of the returned intent. The Y, and Z values will also be returned. See OpenIntents.org for full details.
This allows any application to launch a calculator for the user.
This software comes without any warranty, implied or otherwise.
Questions and comments can be directed to Ed Falk, efalk (at) users.sourceforge.net. When contacting me, remember that you didn't pay anything for the software.