New: Where's the menu key for Samsung S5? 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,
.,
EEX, and
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 |
---|---|---|
C | T: 0.00 Z: 0.00 Y: 0.00 0.00 |
Clear the stack |
1 | T: 0.00 Z: 0.00 Y: 0.00 1 |
X = 1 |
ENTER | T: 0.00 Z: 0.00 Y: 1.00 1.00 |
X pushed to Y |
2 | T: 0.00 Z: 0.00 Y: 1.00 2 |
X = 2 |
ENTER | T: 0.00 Z: 1.00 Y: 2.00 2.00 |
Stack pushed again |
3 | T: 0.00 Z: 1.00 Y: 2.00 3 |
X = 3 |
× | T: 0.00 Z: 0.00 Y: 1.00 6.00 |
X receives 2×3; stack is popped. |
+ | T: 0.00 Z: 0.00 Y: 0.00 7.00 |
X receives 1+6; stack is popped. |
Let's evaluate:
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 Z: 0.00 Y: 3.00 3.00 |
First value entered |
7 | T: 0.00 Z: 0.00 Y: 3.00 7 |
X = 7 |
f X² | T: 0.00 Z: 0.00 Y: 3.00 49.00 |
X receives 7² |
+ | T: 0.00 Z: 0.00 Y: 0.00 52.00 |
X and Y are added |
8 ENTER | T: 0.00 Z: 52.00 Y: 8.00 8.00 |
8 entered, previous value pushed into stack. |
5 + | T: 0.00 Z: 0.00 Y: 52.00 13.00 |
X receives 8+5 |
÷ | T: 0.00 Z: 0.00 Y: 0.00 4.00 |
And finally, we divide. |
Let's evaluate:
√(4²+3²)
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 Z: 0.00 Y: 0.00 16.00 |
4² entered |
3 f X² | T: 0.00 Z: 0.00 Y: 16.00 9.00 |
3² entered |
+ | T: 0.00 Z: 0.00 Y: 0.00 25 |
Add |
√ | T: 0.00 Z: 0.00 Y: 0.00 5 |
Square root |
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.
Shifted functions | |
---|---|
f | Used to access the shifted functions (displayed in orange.) |
Data Entry | |
0…9 . | Data entry |
CHS | Change sign.
For example, for -3 , enter
3 CHS. |
EEX | Exponent for scientific notation. For example, key 1 . 2 EEX 9 for 1.2×10^{9} (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. |
C | Clear stack |
AC | Clear everything |
REG | Clear registers |
Last X | Recall most recent X value |
X↔Y | Swap X,Y values |
R↓ | Rotate stack down |
π | Pi |
Math | |
+ | 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 |
e^{x} | Compute e to X power |
10^{x} | Compute 10 to X power |
ln | Compute natural log of X |
log | Compute log base 10 of X |
y^{x} | Compute Y to power of X |
1/x | Compute 1/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 |
Memory Registers | |
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. |
Percents | |
% | Compute X% of Y [X = X*Y*.01] |
Δ% | Compute percent change from Y to X [X = 100*(X-Y)/Y] |
Conversions | |
→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? Solution: Enter 2.2033
→HAnswer: 2.34 hours | |
→HMS | Hours to hours.mmss |
Example: What is 1.8 hours in hours, minutes,
seconds? Solution: Enter 1.8
→HMSAnswer: 1:48:00 Hint: Use SHOW to see all the digits. | |
→RAD | Degrees to radians |
→D | Radians to degrees |
Permutations | |
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? Solution: Enter 3 ENTER
8 P(x,y)Answer: 336 | |
C(x,y) | Return number of combinations of X items from a population of Y |
Example: Same as above, but the order doesn't
matter. Solution: Enter 3 ENTER
8 C(x,y)Answer: 56 | |
Statistics | |
∑+ | 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.
Keyboard shortcuts: | |
---|---|
F | f |
0…9 | 0 … 9 |
. | . |
E | EEX (exponent) |
C | CHS (change sign) |
+ - * / | + - × ÷ |
DEL | ← |
Enter | ENTER |
X | X↔Y |
R | RCL |
S | STO |
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 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 Financial menu. Swipe up from the bottom of the screen to minimize RpnCalc Financial 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.
But if you need a day-to-day financial calculator that's always with you, that doesn't take up any extra space in your pocket, and has a user interface you'll find familiar, then this is the calculator app for you.
Q: How do I switch from scientific mode to basic and back?
A: The device's menu key 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 privacy policy is really quite simple: RpnCalc does not collect any personal information of any kind. It never accesses the internet and it never sends any information whatsoever to anybody.
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.