1

I hope I'm writing this post in correct forum. I've got a equation -11*2*(-1)*3 which i transferred into RPN -> 11,2,*,1,-,*,3,*,-. And here I have problem with resolving it:

11*2 = 22
22-1= 21
22*what = ?

what should i multiply by in last equation (I've got nothing left on stack) ...?

Mikkey
  • 95

1 Answers1

0

There seems to be some confusion in the question about whether $−$ is a binary or unary operator. Certainly you shouldn't be doing any subtraction when computing this product...

I would translate this expression (it's not an equation, there's no equals sign) as $$−11,2,*,−1,*,3,*,$$ or if you require that we use only positive integers and interpret $−$ as a unary negation operator, $$11,−,2,*,1,−,*,3,*.$$

Alex Kruckman
  • 76,357
  • Perhaps, to disambiguate, we should use $-$ for the binary operator and $^-$ for the unary one, like $11,{}^-,2,,1,{}^-,,3,*$. – Akiva Weinberger Nov 06 '16 at 15:46
  • The Hewlett-Packard HP11C RPN scientific calculator (the best calculator ever) had a CHS (change sign) key equivalent to the $\pm$ key on algebraic calculators so if one wished only to enter non-negative numbers one could express it as $11,\pm$. – John Wayland Bales Jan 12 '17 at 22:15