Post Reply 
Free42 NSTK ENTER behavior
10-16-2021, 01:07 PM
Post: #26
RE: Free42 NSTK ENTER behavior
(10-16-2021 08:32 AM)Peet Wrote:  
(10-15-2021 06:01 PM)squid2 Wrote:  .. in 4STK mode, you'd have a leftover 21 on the stack due to running out of stack space and quirks of the 4STK ENTER behaviour.

That is no quirk but well documented, wanted and correct behaviour of RPN. It is based on the function of the T-register and is explained in almost every RPN documentation. You can find this explained in detail e.g. in the manual of the HP35 (from 1972) and in the manual of a brand new HP-12C Platinum from 2021.

Sure, the 4-element stack and duplication of the T register are documented in HP manuals, and programs could be written to expect and depend on this behaviour. It’s just not the behaviour you’d naturally expect when you are taught RPN as something based on a stack (without an explicit depth limit) rather than based on four named registers with duplication of the T register on drops. Situations needing a stack depth greater than 4 are quite commonplace and mundane; they can be dealt with using storage, but it’s extra cognitive burden to keep track of stack depth and know if it’s about to fill up. Likewise, duplication of the fourth element of the stack on drops is not something you’d expect from a stack, it’s rather a quirk/feature of HP’s four register notation.

I think the reason I feel this way (compared to old timers like Peet) is that I haven’t been using classic HP 4-register “stack” based calculators for 40+ years. HP switched to an “unlimited depth” (normal to me) stack in RPL machines years before I was born, and I was taught RPN as being based on a stack rather than four registers. I’ve been using Free42 for a few years, though the stack depth limit and T register behaviour has kept tripping me up once in a while when I need to calculate something requiring full or extra stack depth. I was really pleased to discover NSTK mode yesterday as it works the way (stack-based) RPN is supposed to work, 1970s hardware limitations aside.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Free42 NSTK ENTER behavior - fqz - 02-28-2021, 03:15 AM
RE: Free42 NSTK ENTER behavior - fqz - 02-28-2021, 03:05 PM
RE: Free42 NSTK ENTER behavior - DM48 - 03-07-2021, 01:28 PM
RE: Free42 NSTK ENTER behavior - fqz - 03-07-2021, 01:46 PM
RE: Free42 NSTK ENTER behavior - fqz - 03-07-2021, 04:13 PM
RE: Free42 NSTK ENTER behavior - fqz - 03-07-2021, 05:38 PM
RE: Free42 NSTK ENTER behavior - fqz - 03-08-2021, 12:39 AM
RE: Free42 NSTK ENTER behavior - Werner - 03-08-2021, 06:23 AM
RE: Free42 NSTK ENTER behavior - rprosperi - 03-08-2021, 01:33 PM
RE: Free42 NSTK ENTER behavior - rprosperi - 03-09-2021, 12:56 AM
RE: Free42 NSTK ENTER behavior - fqz - 03-19-2021, 01:40 PM
RE: Free42 NSTK ENTER behavior - Werner - 03-09-2021, 07:53 AM
RE: Free42 NSTK ENTER behavior - squid2 - 10-15-2021, 06:01 PM
RE: Free42 NSTK ENTER behavior - squid2 - 10-16-2021, 12:29 PM
RE: Free42 NSTK ENTER behavior - Peet - 10-16-2021, 08:32 AM
RE: Free42 NSTK ENTER behavior - squid2 - 10-16-2021 01:07 PM
RE: Free42 NSTK ENTER behavior - Peet - 10-16-2021, 03:32 PM
RE: Free42 NSTK ENTER behavior - squid2 - 10-16-2021, 04:03 PM
RE: Free42 NSTK ENTER behavior - Peet - 10-16-2021, 10:12 PM
RE: Free42 NSTK ENTER behavior - ijabbott - 10-17-2021, 09:11 AM
RE: Free42 NSTK ENTER behavior - BruceH - 10-17-2021, 03:25 PM



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