WP 34S > WP 31S

04052014, 07:15 PM
Post: #269




RE: WP 34S > WP 31S
(04042014 08:46 AM)walter b Wrote:(04042014 08:00 AM)Paul Dale Wrote: I'd prefer an unlimited stackAn unlimited stack has a significant drawback: there's no top level which can be repeated. IMHO, 8 levels are a nice practical compromise connecting the best of two worlds. Okay, this may be a radical suggestion, but I have given it some thought and I think it would be marvelous. So here it goes. The convenience of the toplevelreplication is largely (or exclusively) due to the following fact: when levels y,z,t (or y,z,t,a,b,c,d) have the same value (probably different from x), and if any binary operation (let us say multiplication y*x) is performed on x & y, then the answer y*x is placed in x, while y stays unchanged. In fact, some binary operations such as Delta% and %T (percentage of total) have standard RPN implementations that put the answer in x while leaving y undisturbed, because this is often more convenient. The same behavior is very useful in other contexts, precisely when toplevelreplication comes in handy. How could these advantages be realized without toplevelreplication? Well, they could easily be achieved if we could "force" a binary operation such as multiplication * to behave in the manner that Delta% or %T behave. Therefore, corresponding to, say, ordinary multiplication * there should be a different binary operation # that, applied to the stack, leaves y unchanged while placing the product y*x in x. For instance, Horner's algorithm to evaluate pz^2 + qz + r would read Code:
This will leave the answer in x and the original value r in y. Internally, every regular binary operation such as +, , *, / , ^, etc, would have a counterpart that leaves y undisturbed. More esoteric functions such as nCr (combinations) may perhaps not be worth the effort of being given a counterpart. The trick would be using the regular operation * as well as # in a sensible manner in practice. Here I offer some ideas: A semilong press of the * key (say, at least 0.5s but less than 1s) would call the function # instead of * (while >1s would NULL). An alternative idea is using flags. There could be a single flag that changes the default behavior of binary operations to act as I have explained. A much better idea would be having a separate flag for each operation. A simple SF* or CF* would enable or disable the new behavior for the multiplication operation *. Perhaps even better, pressing the corresponding key * for 0.5s would have the effect of *toggling* the flag, so subsequent uses of the key would have the opposite behavior. There could also be a global flag disabling this new behavior to avoid confusing users unfamiliar with it. For me, the motivation is to have a uniform way to deal with all binary functions that may or may not leave y undisturbed at the user's choice. Perhaps these ideas can materialize in the 43s, which I would absolutely rather have an infiniteheight stackthe lack of toplevel replication seems a weak argument to have a fixedheight stack. SuperNumero 

« Next Oldest  Next Newest »

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