[Tutor] A little math and Python: Horner's rule

alan.gauld@bt.com alan.gauld@bt.com
Wed, 21 Aug 2002 18:11:05 +0100


> the constructs that I used to create in high school to feed my HP 15C 
> calculator that uses an entry format called "reverse Polish notation" 

Sharing the nostalhgia - I couldn't afford an HP so used a 'Novus' 
calculator that was also RPN based. I agree that once you got 
used to it it was much faster and very powerful - parens 
were hardly ever needed.

Sadly my Novus did not last as long as your HP....

FWIW ISTR that the X windows calculator xcalc can accept a flag that 
makes it into an HP clone complete with RPN. Or am I hallucinating again?

Finally you might find it fun to play with Lisp/Scheme which 
use a system similar to RPN called prefix notation:

(* 3 4) => 12
(+ 5 6 8) => 19
(- 3 (+ 4 8)) => 9

Of course being Lisp(*) parens are everywhere.

(*)
LISP = Lots of Irrelevant Silly Parentheses...