Post Reply 
Brand new to RPN, few questions on bits!
09-07-2014, 01:48 AM
Post: #5
RE: Brand new to RPN, few questions on bits!
(09-06-2014 06:52 PM)Kyburo Wrote:  First question: A cool new feature I found on my casio is that I can enter in an equation including variables like x, and then at the end give the x value and let it perform the calculation.

eg) x^2 + 6x + 9
then after entering the above I can use "calc" to specify that x = 2 say, and it'll spit out the answer to the above equation.

I've been trying to find a simple explanation to do this on a RPN calc, but not found anything so far, and the manuals for both the HP35s and WP34s are a bit of info overload right now.

Good question! Of course, with modern calculators there are lots of ways to do this, but since you're specifically asking about RPN, I'll give you the way an old-school RPN purist would approach this, ever since the introduction of the HP-65 back in 1973: write a program.

Something like this:

Code:

LBL E     // Program runs when you press "E" or "XEQ E"
ENTER^    // Copy the value on the stack
x^2       // Square it
x<>y      // Get the other copy
6         // Multiply it by six
*
+         // x^2 + 6x
9         // Add 9
+
RTN       // End of program/subroutine

Now, whenever you want to evaluate that expression (it's technically not an equation), you just put the x value in the X register and press "E"; the little program runs, and you get the value of the expression left in the X register. You can also use this as a subroutine in other programs, e.g. to produce a table of values or even graph the expression.

For a lot of (repetitive) tasks, a short program is an easy solution - and this was probably the most common application of early programmable calculators like the HP-65, -55, etc.

--- Les
[http://www.lesbell.com.au]
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Brand new to RPN, few questions on bits! - Les Bell - 09-07-2014 01:48 AM



User(s) browsing this thread: 1 Guest(s)