# [OT] -10^2

Jan Schenkel janschenkel at yahoo.com
Fri May 23 09:59:00 EDT 2003

```--- Geoff Canyon <gcanyon at inspiredlogic.com> wrote:
>
> On Friday, May 23, 2003, at 12:40  AM, Jan Schenkel
> wrote:
>
> > So in this case, after all the firsty three bits
> are
> > interpreted, there's only a single operand left on
> the
> > stack for the minus, so it acts as the unary
> operator.
>
> I was assuming there were other values on the stack
> beneath the given
> expression. In other words how would you make the -
> negate the 10^2
> portion of this instead of subtracting 5 from it?
>
> 5 10  2  ^  -  *
>
> What I want is this:
>
> (-(10^2))*5
>
>
> regards,
>
> Geoff Canyon
>

Ah, the joys of RPN and programming one's HP
calculator -- wonderful aye, Miscdas :-)

In this case, you would have to put the 5 between the
minus and the multiply

10  2   ^  -   5   *

Or you could sneak in a zero and make the minus a
binary operator :

5   0   10  2   ^   -   *

Hope this helped,

Jan Schenkel.

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

```