[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Sliderules, Logs, and Prodigies
Timothy C. May wrote:
>
> At 10:33 AM -0800 11/7/96, Dale Thorn wrote:
>
> >According to HP, the "Polish" part of the term comes from a Polish
> >mathematician whose
> >name (I can't spell it, and I don't have the .DOC) is pronounced phonetically:
> >WOOCASHEVITZ. The "reverse" part apparently means the inventor specified the
> >operation before the parameters, instead of how HP implemented it.
>
>
> Lucaciewicz, as I recall. His notation was originally that one would add
> two numbers, a and b, as "+ a b." A modified form, adapted for stack
> machines, was to add two numbers with "a b +." Hence, _reverse_ Polish
> notation, but equally sound.
>
> This involves entering a, then pushing it onto the stack with an ENTER,
> then entering b, then hitting the "+" key to pop the stack and place the
> sum in the main (X) register.
>
> For people who claim that (6 + 7) * 5 is the "natural" way to do things, I
> point out to them that the way one does it one's head is to take 6 and 7
> and add them then to multiply by 5. Or I show them
>
> 6
> + 7
> -----
> 13
> * 5
> -----
> 65
>
> Then they see that RPN is actually the way we do things in our head. Or on
> paper.
>
> Computers do things with parentheses, we don't.
>
> By the way, Polish notation is how LISP evaluates expressions. E.g.
>
> (+ 6 7)
>
> or, for the full problem above,
>
> (* 5 (+ 6 7))
>
> And for those of you are not LISP or Scheme fans, the language FORTH also
> uses Polish notation. RPN, in fact.
I think claiming RPN for Forth is pushing it a little far. Admittedly it is
stack-based (well, two-stack-based), and everything an operator can operate on
is to the left, but the provision of arbitrary stack manipulation, "compile"
mode (triggered by the '[' operator, if my memory serves) and so on make it
rather a different beast.
Incidentally, PostScript is Forth in disguise.
Cheers,
Ben.
--
Ben Laurie Phone: +44 (181) 994 6435 Email: [email protected]
Freelance Consultant and Fax: +44 (181) 994 6472
Technical Director URL: http://www.algroup.co.uk/Apache-SSL
A.L. Digital Ltd, Apache Group member (http://www.apache.org)
London, England. Apache-SSL author