3 ms·
It works here because the expression is simple. You only have four variables on the stack (maybe more in later models that I'm not aware of) and for those, you
by hota_mazi 9y ago
It works here because the expression is simple. You only have four variables on the stack (maybe more in later models that I'm not aware of) and for those, you are screwed if you just push things on the stack in reading order:
2 * (3 + (4 + (5 + (6 + 7))
The only way to process this is to determine the most nested expression and start there:
6 7 + 5 + 4 + 3 + 2 *
... you get the idea.
Expand this expression with multiple deeply nested parens and the limitations of RPN become very obvious.
- ScottBurson 9y agoI'm pretty sure the more recent, higher-end RPN calculators have lots more than 4 stack slots. 4 is usually enough in practice anyway. Your example is artificial. Besides, are you sure your infix calculator will accept this deep a nesting of parentheses? The TI models that were contemporary with the early HPs certainly wouldn't!
- deleted 9y ago[deleted]