|Re: Best way implement an RPN stack?|
Message #12 Posted by M. Joury on 20 Oct 2010, 6:55 p.m.,
in response to message #11 by Martin Pinckney
1. It is relatively easy. There are examples out there that do this only a little too slow to be useful. I already have a HPBasic implementation that is sufficiently responsive to be usable but I have stopped further development on it and am rewriting it all in Sys RPL.
2. Because I can and I enjoy the challenge. I own all three of the calculators you mentioned in addition to nearly every scientific/graphing calc HP has ever produced. For daily use I generally employ a HP48S/X or G/X as I prefer their keyboards to that of the 49g+, etc.
The HPBasic implementation so far handles basic 4 banger arithmetic, full 4 position stack manipulation including T replication (X<>Y, RollUp, RollDown, LastX, currently stack store / recall are not available), basic trig and log functions (no hyperbolics yet--would be easy to add), 30 storage registers, mode settings for std, fix, sci, and eng. Angle mode settings (DEG, RAD, GRAD) would be easy to add as would any other 1 or 2 variable functions (such as hyperbolics). The current HPBasic implementation is around 9K (source) and 19K after the first run.
For the sRPL implementation I plan on providing all the above plus hyperbolics, combinations, permutations, etc. (basically any scientific functions that the 39gs is capable of), 100 storage registers with full store arithmetic (this is already working) and in the future I might also implement rcl arithmetic.