Euclid's RPN was designed to:
When you launch Euclid it places an icon in the system tray on the task bar, then waits for you to click the icon or press the "HotKey" to open the calculator. When you close the calculator it resumes its role as an icon on the task bar ready for use the next time it's needed.
If you are not familiar with RPN calculators you may want to read this
Introduction to RPN. before continuing.
If you are familiar with RPN then the following sections will introduce
you to this version, Euclid's RPN.
HotKey
The hotkey is a particular combination of keys selected and assigned by Euclid to
provide keyboard access to the calculator from other applications. Clicking the Euclid icon in the system tray or pressing the hotkey opens the calculator or makes it the
active application if its already open. The control key [Ctrl] and the number pad [+] are the keys assigned as the hotkey by the calculator program.
Active keys
Most of the keys on the keyboard are incorporated for use by the calculator. The
following table lists the details of the key assignments that are active while the
calculator is in use.
Active Key Table
|
||||||||||||||||||||||||||||||||||||||||||
Mouse Operations
Aside from the obvious use of the mouse to operate the calculator, the mouse also provides some control of the calculator display and access to Euclid's menus.
Control Menus
Copy/Paste Menu
|
Options Menu
|
Keyboard Commands
Euclid has associated a command for each math function, operation, or control that is supported by the calculator. Each command consists of a three character symbol which executes or applies the appropriate math function or operation when the command is typed*. The following table lists and describes each command. *(The command symbols may be typed in either upper or lower case)
X and Y as used in the table descriptions generally refer to the values in the x or y registers.
Command Table (commands that do not have a corresponding function button on the display are marked in the table with an asterisk)
|
Installation & Configuration
Installation
To Install Euclid's RPN Calculator on your computer you should download or copy the instalation program to your computer.
The installation program creates a folder for Euclid in the program files folder on your computer and adds shortcuts on your DeskTop screen and Start menu. You should move or copy the DeskTop shortcut to your startup folder so Euclid automatically runs when you restart or power up your computer.
Configuration
The only configuration nessesary for Euclid is the tax rate. You should change Euclid's 8.25% default tax rate to reflect your local sales tax rate before using the tax function.
To set Euclid's tax rate
The best way to learn RPN is to use it. So if you haven't already done so, download Livingsoftware's Euclid, install it, launch it and open the calculator. Then work the simple examples provided below. The examples include step by step key strokes with some discussion on each type of math operation. Before you are through with the examples you will be (mathematically speaking) fully reversed and Polish.
While working through the examples keep in mind that when using RPN you put numbers or a number on the stack, and then select the operation you want to perform. (square root, addition, multiplication, etc.) Euclid takes the number or numbers needed for that particular operation from the stack, performs the math and places the result back on the stack where it is displayed and possibly used for further computations.
When entering two (or more) numbers for use in a calculation, the numbers must be
separated with a space, a comma, the Enter key, or the calculator Enter button.
This entry step is allowed but not required* where a number is followed by a math
operator or command.
* This step is not required because Euclid, as part of the process of each
command, operation, or function, first checks the entry register for pending entries,
and if necessary provides the entry step before performing it's designated function
or operation. In other words, if it needs to be done, and you don't do it, then
Euclid will.
Most of the time the calculator displays the contents of the stack's X register, which is either the number that was last entered or the result of the last operation. However, as a new number is entered, the display switches temporarily, to show the number as it is keyed into the entry register. As soon as the entry is completed, the content of the entry register is moved to the stack and the display switches back to show the new entry on the stack, formatted to whatever precision the display is currently set.
Examples
After you have installed and launched Euclid, open the calculator by clicking on the Euclid icon in the system tray on your task bar.
If necessary, use the cursor keys (up, down, left & right arrow keys) to move the calculator on your screen so you can comfortably use the calculator and still view these examples.
Type the Stack command "STK" to open the stack display window so you can watch how the numbers are handled by the stack as you step through the procedures for each example.
A manual entry step is included before the math operation steps purely to demonstrate the status of the stack as it exists immediately before the math operation. These otherwise unnecessary entry steps are marked where they occur in each example with a double asterisk "**". Keep in mind that except but for the purpose of this stack demonstration, these steps would be omitted and these stack entries would be accomplished by the math operation as a normal part of it's process.
Key in 35.7
[Enter]
Notice as you key in the first number the calculator display shows the number as it is being entered, after the [Enter] the stack display shows the number in the x register, and that the display has switched to show the stack.
Key in 15.2
[Enter]**
This time notice that after you press [Enter], the second number is in the x register and the first number is now in the y register.
[+] Click the "+" button or press [+] on the keyboard to add the numbers.
Answer 50.90
Ok, this is what happened when you added the two numbers. Euclid took two numbers from the stack, added them and put the answer back on the stack. When Euclid takes a number from the stack it takes the number from the x register. The next number on the stack becomes available because when you take a number from the x register the number in the y register replaces the number taken from x register and it in turn is replaced by the next level the (z register) which is replaced by the t register and so on for each remaining register in the stack.
Leaving the result of this simple addition problem on the stack, and with these details fresh in mind let's continue with a few more examples.
Key in 17.3
[Enter]
Notice the previous result is pushed to the y register and the first number of this example is placed in the x register.
Key in 6.1
[Enter]**
Now 6.1 is in the x register, the first number, 17.3 is in the y register and the answer from the previous problem has been pushed to the z register.
[-] subtract the second number from the first.
Answer 11.20
Again, Euclid takes two numbers from the stack, performs the math (in this case subtracts the first number taken from the stack from the second number taken from the stack) and puts the answer back on the stack.
Now we have the answer to this example problem in the x register and the answer to the first example problem in the y register. We could clear the stack and start another example but it's not necessary. In fact it is never necessary to clear the calculator stack before beginning a new problem. Numbers left on the stack will eventually be pushed off the end of the stack and discarded. However, it is not uncommon that you need to refer again to previous solutions or even need to use them again later in a problem you are working on only to find them patiently waiting in some other register in the stack. In this case we will use both of these answers in the next example.
This example asks for the product of two numbers. The two numbers happen to be our answers to the previous two examples. We could start from scratch, by entering the two numbers, and then press the multiplication operator [*] for the answer. But, since we conveniently left the two numbers on the stack the obvious method of solving this example problem is simply to press the multiplication operator, and expect Euclid to take the two numbers from the stack multiply them and place the answer back on the stack, which is exactly what it will do.
[*] perform the multiplication.
Answer 570.08
Key in 16
[Enter]
Key in 3
Enter**
[/]
Answer 5.33
Euclid takes the two numbers from the stack, divides the first number it takes from the stack into the second number from the stack and places the result back on the stack.
It is somewhat important that your are aware that when a math operation requiring two numbers is performed Euclid always mathematically applies the first number it takes from the stack to the second number It takes from the stack. (ie. the first number is added to the second number, the first number is subtracted from the second number, etc). For some operations this fact is immaterial, x + y is the same as y + x. But for division or subtraction and other operations it is mathematically important.
Now that we have explored how the stack operates, we can simplify the discussions pertaining to the numbers on the stack or taken from the stack, and make the order of the numbers used in operations more obvious, by refering to the number that is (or was) in the x register as X. Likewise Y will represent the number that is (or was) in the y register at the time we initiate a function or operation.
This example includes all 4 of the basic math operators and expresses their use in the equation as one problem. Parentheses and rules based on the left to right orientation of the factors as well as the mathematical hierarchy of the operators are often used in an expression to dictate the order of execution which can be crucial in determining the correct solution to a problem.
We use our knowledge of these rules and the parentheses given in a specific problem to organize the problem into a sequence of simple intermediate operations which result in intermediate solutions that will then be used as factors for operations at the next level in the sequence.
In this example problem, those rules and the parentheses indicate that we need to
multiply 3 * 1.5 and to that result we need to add 4.3 leaving this factor pending
we next need to subtract 6.5 from 12.4 and then divide the resulting difference
into our pending factor for the final solution*.
Notice how the stack handles the intermediate solutions as you perform the steps
provided below to solve this example.
(3 * 1.55 + 4.3) / (12.4 - 6.5)
Key in 3
[Enter]
Key in 1.55
[Enter]**
[*]
Key in 4.3
[Enter]**
[+]
Key in 12.4
[Enter]
Key in 6.5
[Enter]**
[-]
[/]
Answer 1.52
* The "final solution" label used here is tentative. Any answer, as we have already seen, may in fact turn out to be only a factor within the context of a larger problem.
The point of this example is that no mater how complicated a math problem is, it can almost always be solved by separating it into simple terms, as we did here, using RPN and the stack capabilities of Euclid.
Look again at this same problem and the solution steps expressed below in a different form.
(3 * 1.55 + 4.3) / (12.4 - 6.5) the original problem (algebraic notation)
3 [Enter] 1.55 [*] 4.3 [+] 12.4 [Enter] 6.5 [-] [/] the solution Reverse Polish Notation
Notice I've left out the unnecessary [Enter]** steps, and shown the steps left to right rather than each on a separate line.
Keep these concepts in mind as we introduce the other types of operators and functions of Euclid in the remaining examples because everything we have said up to now applies to everything that follows.
125 [Enter] 5 [1/x] [^]
Key in 125
[Enter]
Key in 5
[Enter]**
[1/x] (the reciprocal key)
[^]> (the power function Y X), raise Y (125) to X (1/5)
Answer 2.63
Because the need for the reciprocal of a number (1 divided by that number) is so common in mathematical equations, [1/x] is included as an Euclid function.
Enter 5, then enter 3, then divide the 3 by the 5
5 [Enter] 3 [XCH] [/]
Key in 5
[Enter]
Key in 3
[Enter]**
[XCH] swap the contents of X & Y
[/] Divide
Where the order of X & Y is significant (ie. subtraction, division, etc.) the [XCH] function provides a convenient means of swapping the contents of the X & Y registers.
97.5 [TAX][+]
Key in 97.5
[Enter]**
[TAX] (calculate and enter the tax on x)
[+] (Add the tax to the value taxed)
Answer 105.54 (using the default tax rate of 8.25%) The tax function calculates the tax on the value of X using the installed tax rate. If you have not already done so you should set the tax rate for Euclid to reflect your local sales tax rate. (See the Installation and Configuration Section for the details on setting the tax rate).
37.5 [Enter] 14 [%] [-]
Key in 37.5
[Enter]
key in 14
[Enter]**
[%] (calculate and enter X percent of Y)
[-] (subtract the calculated discount from the value)
The square function [sqr] used below is one of several operators for which
there is no actual key assigned, or button provided on the calculator.
Operators are accessed by typing the three character name associated with
the function.
(See the Command Table for a list of all of the available operator names
and their usage).
use: Area = pi ( r 2)
4.7 [Enter] 2 [/] [sqr] [PIE] [*]
Key in 4.7
[Enter]
Key in 2
[Enter]**
[/] Calculates the radius (half of the diameter)
[sqr] Calculates the square of the radius
[PIE] Enters the constant pi to a ridiculous degree of precision
[*] Completes the area calculation
Answer: 17.35 in.2
Convert the rectangular coordinates (23.8,75.6) to a vector (polar coordinates)
75.6 [Enter] 23.8 [POL]
Key in 75.6
[Enter] Enter the rectangular coordinate Y value
Key in 23.8
[Enter]** Enters the rectangular coordinate X value
[POL] Performs the conversion.
Results - A vector of 79.26 units @ 17.47 degrees or 0.3 radians
(USE [XCH] to view the angle and [Rad] to espress the angle in radians)
This function converts the rectangular coordinates x & y to polar coordinates (radius and angle). The resulting angle replaces the y coordinate in the y register and the resulting radius replaces the x coordinate in the x register. The angular value calculated is expressed in either degrees or radians depending on the current trigonomic mode setting for Euclid.
36.869 [Enter] 5 [REC]
Key in 36.869
[Enter] Enters the angle in degrees*
Key in 5
[Enter]** Enters the vector magnitude or radial (radius)
[REC]
Results - X = 4, Y = 3
*This example assumes Euclid's trigonomic mode is configured to work in degrees (the default). If you've set your trigonomic mode to radians, then an additional step is required at this point in the example. Type the [RAD] command after entering the value for degrees to convert this value from degrees to radians before continuing.
Example 13. Trigonometry - Sine of 30 radians = sine(30)
30 [DEG] [SIN]
This example also assumes the trigonomic mode is degrees (the default)
Key in 30
[Enter]** the angle in radians
[DEG] convert the angle to degrees,
[SIN] Calculate the sine of X where X is the angle
Answer 0.5
The trigonomic functions sine, cosine, tangent, and cotangent, expect an angle
in X expressed in either degrees or radians, according to the current trigonomic mode.
Also, the inverse trigonomic functions, Arc-Sine, Arc-Cosine, Arc-Tangent and Arc-Cotangent,
all return in X the angle expressed as either degrees or radians, according to the current
trigonomic mode.
Example 14. Common Logarithm - Calculate the Common Logarithm (base 10) of 256
Key in 256
[Enter]**
[LOG] Common Logarithm, Log10(256)
Answer 2.41
Note: X must be a value greater than zero.
Example 15. Exponentiation Raise 10 to power of X where X = 2.40824
Key in 2.40824
[Enter]**
[EXP]
Answer (10) 2.40824 = 256
Note: Exponential results for values of X approaching 17 become to large for the display to handle in this version. At some point in this area Euclid gives up and raises a display overflow error.
Example 16. Natural Logarithm - Calculate the Natural Logarithm (base e) of 256
Key in 256
[Enter]**
[LNA] (Natural Logarithm)
Answer Loge(256) = 5.55
Note: X must be a value greater than zero.
Example 17. Antilog - raise the constant e to the power of X where X = 5.54517
Key in 5.54517
[Enter]**
[ANL] (Natural Antilogarithm)
Answer (e)5.54517 = 256
Note: The natural antilog results for values of X greater than 39 rapidly become too large for the display to handle in this version. At some point, after the value of X exceeds 39, Euclid raises a display overflow error.
In the 1920's, Jan Lukasiewicz a Polish logistician described a system by which mathematical expressions could be unambiguously specified without parentheses by placing the operators immediately before the operands (prefix).
example...
( 7 x 5 ) + ( 3 x 6)He patriotically dubbed this new notation system "Polish Notation" in honor of his homeland.
could be expressed as
+ x 7, 5 x 3, 6
Soon after this revelation the developing computer science community realized that by reversing the order, operands first then the operators, (postfix), they could enter the rearranged equation into a program, and a computer using the program could put the operands onto a last in first out stack, and perform the operations as they occurred using the numbers from the stack. This postfix notation system of coding equations made it relatively easy to program and solve extremely complicated mathematical equations in computer languages of all types.
In the late 60's while developing their portable electronic calculator, Hewlett Packard recognized that not only was this backwards "Polish Notation" coupled with the stack easy to program, it was "easy to use". They incorporated this system into their development project, named it "Reverse Polish Notation" to honor the originator of the concept, and introduced it to the world as RPN in 1972 with the announcement of the "HP-35 Pocket Electronic Slide Rule". The World's first pocket calculator that included transcendental functions and could be used to easily solve complex mathematical equations.
Today the elegance and simple consistency of the RPN driven stack based calculator continues to serve the growing needs of the most productive people in the world.
Back to Euclid