Four types of RPN

09022014, 04:16 PM
Post: #1




Four types of RPN
(08282014 10:42 PM)In another thread Joe Horn Wrote: (…) We really, really, really need permanent, unambiguous, universally adopted NAMES for all these various RPN's (…) which hopefully some day can be clearly represented by meaningful, unambiguous, nonjudgmental names (…) In my (still not entirely finished) RPN Tutorial in Appendix G on RPN Variants I propose the following scheme: Purely looking at the workings of the stack of RPN calculators (and not at their programming capabilities) a few RPN variants can be discerned. Both the bottom and the top of the stack may vary. A. Bottom of the stack:
Four types of RPN All four possible combinations of the 2 × 2 possibilities of RPN variants actually do exist, although not always in hardware: α. (alpha type) The combination of Classical RPN with a small stack and ‘top copy on pop’ is well known. Besides the 4level stack of all classical HP RPN calculators (all HP RPN calculators except those listed below after β. and γ.) and their emulations there is the 5level stack of the Heathkit OC1401, and the 8level mode of the WP 31S and WP 34S. β. (beta type) All HP RPN graphing calculators (series 28, 48 & 49, the HP 50g and Prime) have Entry RPN and an unlimited or very large stack (128 stack levels in the Prime). γ. (gamma type) The HP 20b and HP 30b have Entry RPN and a 4level stack with ‘top copy on pop’. δ. (delta type) The Calculator application in Mac OS X in RPNmode combines Classical RPN behaviour of the ENTER key with an unlimited stack. Discussion Following Richard Nelson in his article in HP Solve (#27 p. 42) ‘RPN Evolves’ the terms Classical RPN and Entry RPN only refer to the differences at the bottom of the stack. I think Classical RPN is better here than Classic RPN because the latter term denotes a judgement (‘of the highest quality and outstanding of its kind’) whereas Classical RPN is purely descriptive, as in ‘classical music’ (formal music adhering to certain stylistic principles of the late 18th century). This scheme is unambiguous and nonjudgemental, and can be used for future implementations with different programming languages because it does not say anything about programming capabilities. And it conveys some meaning because it indicates the chronology and link to HP of the RPN variants, α type being the oldest, β type younger and γ type the youngest RPN variant first implemented by HP; and δ type another, nonHP type. The 3level RPN of the HP series 9100 en 9800 could be called ‘preα type’. Just my two cents. Hans 

09022014, 05:44 PM
Post: #2




RE: Four types of RPN
Thanks for your excellent analysis of the differences!
However, I disagree that Greek letters are meaningful names. If something is "meaningful," then it's intrinsically full of meaning. It means that the listener can tell, just by hearing the name, what it's the name of. "Algebraic Entry mode" means something. "Textbook Display mode" means something. "Gamma" means nothing to anybody, until after it's explained, which proves that it's not intrinsically meaningful. IMHO, the names cannot merely refer to the order in which they developed, because that would give no information about what they are, or how they differ. They would have to be explained every time, which kinda defeats the whole reason for having names in the first place. Aristotle (or one of that crowd) said that a good definition of a thing is a statement of the genus to which it belongs, and its specific difference from the other members of its genus. A name is usually shorter than a definition, but unless the name  by itself  makes clear what it's the name of, then it's not a meaningful name. The best names would be something like "Yada yada RPN" where yada yada is the specific difference between that kind of RPN and the others, because such names would be in fact brief definitions... the most meaningful name possible. With all that in mind, I suggest these names: Classical nlevel RPN Entry line nlevel RPN Infinite stack RPN That's 11 possible names (n=4, 5, 8, 64, or 128), I suggest "Entry line" instead of "Entry" because they ALL are forms of entry, so "entry" by itself is not specific enough. But only the "entry line" models use an entry line. We used to call that a "Command line" (remember the CLI on the Amiga?), but I guess it's called an "entry line" now. The Prime manual and builtin help system call it an "edit line". Disclaimer: The above are merely my current opinions. I'm always happy to have my opinions replaced by better ones. A mind is a terrible thing to let stagnate with a logjam of stubborn opinions. And don't try to tell me otherwise! :b <0ɸ0> Joe 

09022014, 06:06 PM
Post: #3




RE: Four types of RPN  
09022014, 09:38 PM
Post: #4




RE: Four types of RPN
(09022014 05:44 PM)Joe Horn Wrote: Classical nlevel RPN There are different entryline RPN models AFAICS: those with top level repetition and those without. Cf. the HP30b (EL 4level with TLR) and the Prime (EL 128level without TLR). Quote:I'm always happy to have my opinions replaced by better ones. A mind is a terrible thing to let stagnate with a logjam of stubborn opinions. And don't try to tell me otherwise! :b d:) 

09022014, 10:17 PM
(This post was last modified: 09022014 10:19 PM by Joe Horn.)
Post: #5




RE: Four types of RPN
(09022014 09:38 PM)walter b Wrote:(09022014 05:44 PM)Joe Horn Wrote: Classical nlevel RPN (Just brainstorming here...) Well, if we limit ourselves to existing implementations (a reasonable thing to do), then everything fits in exactly one of these six groups of RPN models, thus making them unambiguous: Classical 4level RPN (most models) Classical 4&8level RPN (WP 34s) Entryline 4level RPN (20b, 30b, any others?) 5level RPN (what model had 5 levels???) 128level RPN (Prime) Infinite stack RPN (RPL models) There's no need to specify toplevel replication, because that's not ambiguous within any of those groups. "Toplevelreplicating 128level RPN" is redundant, because all 128level RPN's are nontopreplicating. (All one of them.) Similarly, we don't need to mention whether CLx disables stack lift or not, since all the models within each group handle that the same way. Ditto for all features shared within each group. No? (I might be forgetting some models...) It's tempting to call 128level RPN "Prime RPN" because only Prime has it... but that's only true at this time. Who knows; other models might have it later, and "Prime RPN" only names it, but doesn't describe it. So 128level RPN is a better name. Ditto for Classical 4&8level RPN. Wasn't there a 3level RPN in some ancient desktop models? And somebody recently mentioned a model that used Y as the accumulator (bizarre!). We'd need to extend the above table if we want to include those critters. <0ɸ0> Joe 

09022014, 10:22 PM
Post: #6




RE: Four types of RPN
Ceci n'est pas une signature. 

09022014, 10:40 PM
Post: #7




RE: Four types of RPN  
09022014, 10:52 PM
Post: #8




RE: Four types of RPN
(09022014 05:44 PM)Joe Horn Wrote: Thanks for your excellent analysis of the differences! Even names that at first sight seem meaningful often need some explaining. This also applies to your examples. Only after having read the explanation is it relatively easy to remember what is meant by "Algebraic Entry mode" and "Textbook Entry mode". "Algebraic Entry mode" per se could just as easy be a good name for what now is called "Textbook Entry mode". Greek letters per se are not meaningful, but they can be loaded with meaning. Everyone who has read more than one page about gorillas knows what is meant by an "alpha male". Mutatis mutandis the same goes for alpha, beta and gamma radiation. (09022014 05:44 PM)Joe Horn Wrote: With all that in mind, I suggest these names: I agree with you and Aristotle that it all starts with a good descriptive classification. And that classification should include both HP and nonHP calculators, and also calculator programs (for computers, smartphones, tablets, etc.). There are many more RPN (of all types) calculator programs available (especially for smartphones) than there are RPN calculator models in hardware. "Classical RPN" and "Entry line RPN" as classification for the two types of behaviour of the bottom of the stack is perfect to me. They're relatively well known to the community and both names have the same number of syllables. B.t.w.: in the Prime manual the command line is called "Entry line" and not "Edit line". Imho your descriptive classification for the top of the stack is not entirely accurate, and misses the important point of presence or absense of "top copy on pop". It is not accurate because an "infinite" stack can be combined both with Entry line RPN (e.g. the prePrime HP graphing RPN calculators) and with Classical RPN (the Mac OS X Calculator application). And the presence or absense of "top copy on pop" doesn't follow automatically from your classification. Some Entry line nlevel RPN calculators have it (e.g. the HP 20b & 30b) and some don't (e.g. the HP Prime). The word "infinite" denotes a specific mathematical concept (∞) and should better not be used for a stack that is only bounded by available memory. HP uses the word "unlimited" in this context, the computer science term is "unbounded". I would prefer one of those. My proposal for a descriptive classification would be: Each description of an RPN type includes three things:  description of the bottom of the stack (Classical or Entry line RPN)  presence or absence of "top copy on pop" (topcopy or topneutral RPN)  description of the hight of the stack (bounded nlevel stack or unbounded stack) At the moment in real life there exist only four types of RPN:  Classical topcopy 4, 5 or 8level stack RPN  Classical topneutral unbounded stack RPN  Entry line topcopy 4level stack RPN  Entry line topneutral 128level or unbounded stack RPN If we reshuffle this list so that all members of our community can easily remember it we get:  Classical topcopy 4, 5 or 8level stack RPN (the "classics", a.k.a. alpha type)  Entry line topneutral 128level or unbounded stack RPN (the "graphics", a.k.a. beta type)  Entry line topcopy 4level stack RPN (the "??", a.k.a. gamma type)  Classical topneutral unbounded stack RPN (the "???", a.k.a. delta type) Hans 

09032014, 04:57 AM
Post: #9




RE: Four types of RPN  
09032014, 06:37 AM
Post: #10




RE: Four types of RPN
(09022014 10:52 PM)hansklav Wrote:(09022014 05:44 PM)Joe Horn Wrote: With all that in mind, I suggest these names: Sounds better IMHO. Just let me add that the alpha type covers not only the Classics but each and every HP RPN calculator from the HP35 to the HP42S. Beta covers what's known as RPL. Gamma is just represented by two calcs AFAIK (so it could turn out being a sidetrack). And I'm not aware of any tangible calc representing delta. d:) 

09032014, 04:45 PM
Post: #11




RE: Four types of RPN
(09022014 10:52 PM)hansklav Wrote: Imho your descriptive classification for the top of the stack is not entirely accurate, and misses the important point of presence or absense of "top copy on pop". I don't like this wording because it doesn't describe exactly what happens: In the RPL machines and the Prime, the stack is of variable size. If a value is popped off the stack (consumed or dropped) the length of the stack decreases. Thus, the stack may well contain too little objects to perform a given operation. The prime differs just in the maximum size of this stack from the RPL machines. In the other machines the stack has a fixed size. The question is what happens if a value is dropped or consumed: The remaining elements drop one level, except the top of the stack which is left unchanged. The duplication of the value is just a side effect of the drop, not an extra operation. Marcus von Cube Wehrheim, Germany http://www.mvcsys.de http://wp34s.sf.net http://mvcsys.de/doc/basiccompare.html 

09032014, 08:36 PM
Post: #12




RE: Four types of RPN
(09032014 04:45 PM)Marcus von Cube Wrote: The duplication of the value is just a side effect of the drop, not an extra operation. The classical RPN calculators don't really use a stack but use 4 registers to emulate a stack. Thus rollup and rolldown become expensive operations whereas when using what I consider a real stack drop is very cheap: you just move the stackpointer and don't move registers. I think it's interesting that in the older HP calculators (e.g. HP35) a special machine instruction was used for downrotate while in later calculators (e.g. HP41C) this was implemented using multiple read and write operations. Does anybody know why and when this was changed? Cheers Thomas 

09082014, 12:25 AM
(This post was last modified: 09082014 12:49 AM by hansklav.)
Post: #13




RE: Four types of RPN
(09032014 06:37 AM)walter b Wrote:(09022014 10:52 PM)hansklav Wrote: My proposal for a descriptive classification would be: You are right concerning my use of the word ‘Classics’. For a moment I forgot that the term ‘Classics’ is already in use for a specific subset of the α type (alpha type) RPN calculators, notably those issued by HP in 1972 or shortly thereafter. So ‘the Classics’ is not a good term for the whole set of α type RPN calculators. The RPL calculators are not identical to the β type (beta type) RPN calculators because the HP Prime is β type RPN in the above definition but doesn’t have RPL as a programming language. The β type RPN calculators could be covered by the term ‘HP graphing RPN calculators’, but that is a rather long one. My suggestion therefore was ‘the Graphics’, but I don’t think that’s good English… While δ type (delta type) RPN is not available as an actual hardware calculator, it is potentially available to the desktops or laptops of more people (millions) than any of the other types, in the form of the RPNmode of the standard Calculator (Taschenrechner, Rekenmachine, Calcolatrice, Kalkulator, Kalkylator, &c.) application in Mac OS X. Hans 

09082014, 12:37 AM
(This post was last modified: 09082014 12:53 AM by hansklav.)
Post: #14




RE: Four types of RPN
(09032014 04:45 PM)Marcus von Cube Wrote:(09022014 10:52 PM)hansklav Wrote: (…) "top copy on pop". The term is not mine. ‘Top copy on pop’ for the replication of the contents of the T register on stack drop is used already in 1978 by John A. Ball in his book ‘Algorithms for RPN calculators’. The term is short, sounds nice, and describes exactly what the user needs to know. How this is done programmatically is another matter and of no direct concern to the average user (imho). Hans 

09082014, 12:51 AM
(This post was last modified: 09082014 12:57 AM by hansklav.)
Post: #15




RE: Four types of RPN
(09022014 10:40 PM)Den Belillo (Martinez Ca.) Wrote:(09022014 10:17 PM)Joe Horn Wrote: Wasn't there a 3level RPN in some ancient desktop models?several. the hp9100 for instance (09032014 04:57 AM)Paul Dale Wrote:(09022014 10:17 PM)Joe Horn Wrote: Wasn't there a 3level RPN in some ancient desktop models? For these early 2 and 3level RPN calculators I propose the term ‘preα type’ (prealpha type). Hans 

09082014, 04:40 AM
Post: #16




RE: Four types of RPN
Thanks for your explanations.
d:) 

09082014, 05:33 AM
Post: #17




RE: Four types of RPN
There are some more obscure variations, especially of the top of the stack on a drop:
"Infinite", unbounded, expanding stacks can be handled in different ways. Usually there is a bound, just huge. Sometimes a chunk of the top of the stack is removed with a marker placed to recover it as the stack lowers (these are not infinite (there's a limit to the size of the address of the storage place) but can be much larger than the immediate register space.) Some of these variations have not been implemented in hardware calculators that I know of. I personally refer to the four discussed types as HP35 RPN, HP48 RPL, HP20b RPL, and Mac RPN. 

09082014, 06:00 AM
Post: #18




RE: Four types of RPN  
09082014, 09:43 PM
Post: #19




RE: Four types of RPN
(09082014 06:00 AM)walter b Wrote:(09082014 05:33 AM)htom trites Wrote: There are some more obscure variations, especially of the top of the stack on a drop:What's the difference to top copy then?? xyzt + becomes (x+y)zt0, not (x+y)ztt Different than shortening the stack, there's a value there and it's 0 (vs t) 

09102014, 02:04 AM
Post: #20




RE: Four types of RPN
It is more useful on a drop to stuff a 1 into t (assuming a constant size stack), rather than a 0 (1 being more used than 0 in computations), although echoing t is also useful.


« Next Oldest  Next Newest »

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