# -10^2 (OT)

Dar Scott dsc at swcp.com
Thu May 22 12:16:00 EDT 2003

On Thursday, May 22, 2003, at 09:22 AM, Chris Sheffield wrote:

> Hope I don't get flamed for this, but I don't agree.
> :-)  Someone feel free to dispute me if I'm wrong, but
> I think Rev is correct.  Isn't -10^2 the same as
> -10*-10?  And don't two negatives yield a positive
> when multiplied together?  Therefore, the answer would
> be 100.  It's basic Algebra.

I believe in traditional mathematical notation negation is like
multiplication of -1.  Since the power would be done before
multiplication, the traditional view would see the expression as
-(10^2).

Given that I would be surprised if some folks learn it otherwise when
learning algebra.

However, we are already separated by / and * and ^ and even ** in some
languages, so the syntax is different.  The greatest difference is in
the case of juxtaposition for multiplication, which is already
ambiguous in traditional mathematics since it is also used for function
application.  I think we have to accept programming languages as
different.  (I frowned when I heard the True Basic ads saying Basic is
the language of algebra.)

I think I have seen some programming language handle negation as the
traditional mathematical way (Haskell?), but I'm not sure.

I think at this point we will all remember that negation is evaluated
before power in Revolution.

Dar Scott