From mboxrd@z Thu Jan 1 00:00:00 1970 From: mike.ab3ap at gmail.com (Mike Markowski) Date: Fri, 20 Mar 2020 16:33:31 -0400 Subject: [COFF] [TUHS] The most surprising Unix programs In-Reply-To: References: <20200320140308.4FBBB18C073@mercury.lcs.mit.edu> Message-ID: <15180a7d-fb65-4a1d-913f-4705e0139e70@gmail.com> Hi Grant, On 3/20/20 12:07 PM, Grant Taylor via COFF wrote: > [a] [enter] > [a] [enter] > [multiply] > [b] [enter] > [b] [enter] > [multiply] > [add] > [square root]   # to solve for c > > (12 keys) On an HP calc, it'd actually be: [a] [square] [b] [square] [add] [sqrt] but no win over infix. A noticeable win is that RPN uses no parentheses. Consider (1+2)*3 / ((4-5)/6)) + log(7/8). RPN: 1 2 + 3 * 4 5 - 6 / / 7 8 / log : 15 keystrokes Alg: counting chars above is 25 keystrokes, 26 with a final '='. I'm not so sure that minimized keystrokes are the real win, in any case. Using RPN trains me to quickly see the equation in its decomposed parts. In the end, it's really about what fits best in your head. The world seems to have spoken that infix is preferred - even if RPN users think they know better! :-) I worked with a now-retired engineer who believed everyone should learn first on a slide rule and that there is no better tool for learning sig figs and ballparking answers. He would lecture about it whenever someone put the decimal point in the wrong place and didn't realize it. As a result, next to my old calculators...yup, a few slide rules! Mike Markowski - correct order for Polish operator :-)