Movatterモバイル変換


[0]ホーム

URL:


 
 

rpn

     A Brief Introduction to RPNThis document very briefly describes the traditional, 4-level stackbased RPN entry system.  It does not describe RPL as used by the -28*and 48* calculators.ENTRYTo evaluate an expression using RPN, just enter it as you would do it.To add 1, 2, and 3, do:1 Enter 2 + 3 +To evaluate:(1 * 4) + (5 / 7)do:1 Enter 4 * 5 Enter 7 / +Note that you only press Enter to separate two numbers.DATA ORGANIZATIONDats is organized into a 4-level "stack," which is typically drawn as:T: tZ: zY: yX: xWhere the UPPERcase letters refer to the names of the registers andthe lowercase letters refer to the contents.  In addition, there are:- an unnamed data entry register- a "last x" register:L:l- numbered storage registers- a "stack lift enabled" bitSIMPLE OPERATIONSBefore:L: lT: tZ: zY: yX: xYou type in a number (10) and press the Enter key.  One of two results:Stack lift enabled: L: lT: zZ: yY: xX: 10Stack lift disabled (not enabled):L: lT: tZ: zY: yX: 10Let's assume that stack lift is always enabled for now.  Let's type inthree more numbers (20, 30, 40):L: lT: yZ: xY: 10X: 20L: lT: xZ: 10Y: 20X: 30L: lT: 10Z: 20Y: 30X: 40Now, press a simple one-operand function (say, x^2):L: 40T: 10Z: 20Y: 30X: 1600Note that the previous value of X was copied to L (not surprizing,given its name).  X now contains the result of the operation.  Again,not surprizing.  All one-operand functions work this way.Now press a simple two-operand function (say, +):L: 1600T: 10Z: 10Y: 20X: 1630The result is the sum of the two numbers in X and Y.  Again, the old Xis copied to L.  The rest of stack is dropped one level, with thevalue in T being duplicated.  Note that the operand order is Y op X.Percent is a special case.  It doesn't drop the stack.  Thus, you can do:10 Enter 20 % -to subtract 20% of 10 from 10.There are two other often-used operations: swap and roll down.  Theydo the obvious (see later table).Clearing (CLx) zeros the X register and clears stack lift enable(disables stack lift).  This means that you can type in the(presumably) correct new value.STACK LIFTMost functions leave stack lift enabled (% and \GS+,\GS- areexceptions).  However, clearing and entering don't.For the most part, you don't need to pay attention to this detail.  Ifyou just type your operations in the way that you expect, they justwork.OH, YESMore recent RPN calculators -- in particular, those designed aroundscreens larger than one number -- separate the data entry memory fromthe X register.  For the most part, operation is identical to oldermachines.  However, you can get into trouble if you press Enter extratimes.Examples of such new machines are the 17BII, 19BII, calculator modesin the 95LX*, 100LX*, and 200LX*, and other programs such as the Lokicalculator.GENERAL FORMSstack lift10 Enter:enableddisabledL: lL: lL: lT: tT: zT: tZ: zZ: yZ: zY: yY: xY: yX: xX: 10X: 10stack lift disabledOne-operand:L: lL: xT: tT: tZ: zZ: zY: yY: yX: xX: f(x)Two-operand:L: lL: xT: tT: tZ: zZ: tY: yY: zX: xX: f(x,y)%:L: lL: xT: tT: tZ: zZ: zY: yY: yX: xX: x * y / 100Swap (x<>y):L: lL: lT: tT: tZ: zZ: zY: yY: xX: xX: yRoll Down (RDN, Rv):L: lL: lT: tT: zZ: zZ: yY: yY: xX: xX: tClear X:L: lL: lT: tT: tZ: zZ: zY: yY: yX: xX: 0stack lift disabled

Areas

General

Craig's Articles

 

Google

 
 

I amCraig A. Finseth.

Back to Home.

Back to top.

Last modified Saturday, 2012-02-25T23:30:11-06:00.


[8]ページ先頭

©2009-2026 Movatter.jp