Posts tagged with 'rpn'

Commodore SR4921

Back in the day, the second calculator I owned was a Commodore SR 4190R , a fun little beast. Once I’d found a replacement for the one I had (it’d got lost at some point) and I’d found an example of its more “experienced” brother, the SR 9190R, I decided to try and get copies of all the similarly-bodied calculators that Commodore had made back in the 70s, maybe half a dozen or so. It didn’t take too long, but there was one of that type that just eluded me, the SR4921. Until earlier this month, that...


Postfix to infix, part 2: adding the parentheses

Once upon a time (all right, it was in May 2010), I wrote an article for PCPlus about generating all possible arithmetic operations with the standard four operators. You can read the article here . After I’d written it, I wrote a blog post about how easy it was to convert the RPN form ( Reverse Polish Notation ) of the expressions I was generating into the standard algebraic or infix form. You can read that post here . (Note that this post will make more sense if you read these two articles first...


PostFix to Infix: converting RPN to algebraic expressions

Yesterday afternoon I finished my latest PCPlus article on generating all possible arithmetic expressions with four operators. The article explored several algorithms, such as evaluating all full binary trees with a certain number of internal nodes (mine was four), evaluating an expression tree, and the like, and for the sidebar I slipped in a quick bit about RPN ( Reverse Polish Notation ) and how succinct it is for describing arithmetic expressions (there’s no operator precedence or parentheses...