[COFF] [TUHS] The most surprising Unix programs

Mike Markowski mike.ab3ap at gmail.com
Sat Mar 21 06:33:31 AEST 2020


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 :-)


More information about the COFF mailing list