RPN Calculator

RPN Calculator

This applet is an RPN calculator build to demonstate the DFP math library. It is modeled loosely on the Hewlett Packard HP-10 series calculator. If you are familiar with the HP-12C financial calculator, this should look somewhat familiar.

In addition to running as an applet, it can be launched via Java Web Start, or you can just download and run the JAR file directly.

There is also a Palm OS version available.

4 Level Stack

This calculator is equiped with a four level stack like the one used in the HP-12C. The stack is composed of 4 registers, named X, Y, Z, and T. Only the X register is displayed. When the user inputs a new number, this goes into the X register.

When the user begins entering a number into the X register, the stack is pushed up. That is, the previous contents of the X register moves into the Y register, the previous contents of Y moves into Z and so on. For example, the table below shows what happens when the user inputs the number 5:

Register Initial State Final State
T 4 3
Z 3 2
Y 2 1
X 1 5

When a binary operator key (+, -, *, /, yx) is pressed, the X and the Y register are combined to produce a result. This result is stored in the X register and the stack rolls down. The Y register now contains what was in Z and Z contains what was in T. T remains unchanged. For example, if the plus key were pressed the stack would change as shown below:

Register Initial State Final State
T 1 1
Z 2 1
Y 3 2
X 4 7

Unary operators, such as sin and cos, replace the value of the X register with the result of the operation. The other registers remain unchanged.

The Enter key copies X into Y and pushes the stack up so that the previous Y goes into Z and so on as illustrated below.

Register Initial State Final State
T 1 2
Z 2 3
Y 3 4
X 4 4

Key Summary

Key Function Inverse Keyboard Shortcut
ex Raise e to the power x Natural log of x
10x Raise 10 to the power x Common log of x
yx Exponentiation ^
1/x Reciprical
CHS Change Sign n
Pi The constant PI p
sin sine arcsine s
cos cosine arccosine c
tan tangent arctangent t
EEX exponent for sci notation e
x2 square square root
Rv Roll stack down r
x:y Swap x and y registers x
<-- Back space, clear X backspace
Enter Push X on stack Retrieve last X value enter
DRG Select angle mode d
INV Select inverse function i
STO Store
RCL Recall
x! Factorial !
/ Division /
* Multiplication *
- Subtraction -
+ Addition +

Storage Registers

This calculator has 20 storage registers that can be accessed through the STO and RCL keys. To store a number in register R0-R9 press STO followed by the number of the register. For example, to store the current X register in R5, press STO 5. To recall R5 press RCL 5.

To access registers R10-R19 press the decimal point just prior to a digit. For example, to store in register R16, press STO . 6 . To recall register R16 press RCL . 6.

Arithmetic operations can be performed on each of the storage registers by pressing an operator key just after STO. For example to add the current value of the X (display) register to register R5 press STO + 5. This can be done with addition, subtraction, multiplication and division.

AltStyle によって変換されたページ (->オリジナル) /