Welcome to Windows Help!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Notation Bugs

 
   Windows Help (Home) -> Microsoft Excel RSS
Next:  INDEX MATCH HELL ooops.. I mean HELP!  
Author Message
gciriani

External


Since: Oct 17, 2008
Posts: 3



(Msg. 1) Posted: Fri Oct 17, 2008 12:54 pm
Post subject: Notation Bugs
Archived from groups: microsoft>public>excel (more info?)

Did anybody notice that Excel handles math notations (symbols) in an
incorrect way?
Try this: write -2 in cell A1.
Write =1-A1^2 in a different cell.
Write =-A1^2+1 in another cell.

The two expressions are equivalent, shouldn't they? Well, the former
gives -3, the latter gives 5.

 >> Stay informed about: Notation Bugs 
Back to top
Login to vote
Gord Dibben

External


Since: Oct 17, 2008
Posts: 21



(Msg. 2) Posted: Fri Oct 17, 2008 1:27 pm
Post subject: Re: Notation Bugs
Archived from groups: per prev. post (more info?)

The formulas are not equivalent

Try =-(A1^2) + 1 for second formula.


Gord Dibben MS Excel MVP



On Fri, 17 Oct 2008 12:54:51 -0700 (PDT), gciriani
wrote:

>Did anybody notice that Excel handles math notations (symbols) in an
>incorrect way?
>Try this: write -2 in cell A1.
>Write =1-A1^2 in a different cell.
>Write =-A1^2+1 in another cell.
>
>The two expressions are equivalent, shouldn't they? Well, the former
>gives -3, the latter gives 5.

 >> Stay informed about: Notation Bugs 
Back to top
Login to vote
Dave Peterson

External


Since: Oct 17, 2008
Posts: 38



(Msg. 3) Posted: Fri Oct 17, 2008 4:13 pm
Post subject: Re: Notation Bugs
Archived from groups: per prev. post (more info?)

Look up "Operator precedence" in excel's help.

You'll see that it doesn't conform to what you were taught in school (well,
probably).

I know that I always include parens when I want to make sure the expression does
what I want.

gciriani wrote:
>
> Did anybody notice that Excel handles math notations (symbols) in an
> incorrect way?
> Try this: write -2 in cell A1.
> Write =1-A1^2 in a different cell.
> Write =-A1^2+1 in another cell.
>
> The two expressions are equivalent, shouldn't they? Well, the former
> gives -3, the latter gives 5.
 >> Stay informed about: Notation Bugs 
Back to top
Login to vote
gciriani

External


Since: Oct 17, 2008
Posts: 3



(Msg. 4) Posted: Fri Oct 17, 2008 5:05 pm
Post subject: Re: Notation Bugs
Archived from groups: per prev. post (more info?)

On Oct 17, 5:13 pm, Dave Peterson wrote:
> Look up "Operator precedence" in excel's help.
>
> You'll see that it doesn't conform to what you were taught in school (well,
> probably).
>
> I know that I always include parens when I want to make sure the expression does
> what I want.
>
That's exactly what I meant, giving precedence to the negation, over
the exponent, is not correct. Negation should be treated exactly like
a subtraction from 0. As you pointed out, this is not the notation we
were taught in school. The notation learned in school has a reason to
exist: it is the only one respecting the commutative law of addition
and subtraction: changing the order of the numbers does not change the
result:
A-B = -B+A

You are smart to use parenthesis, to make sure that Excel doesn't get
it wrong, but what you are doing, is you are interpreting Excel
peculiar notation rule. Instead it should be Excel interpreting one's
notations correctly, not the other way around.

> gciriani wrote:
>
> > Did anybody notice that Excel handles math notations (symbols) in an
> > incorrect way?
> > Try this: write -2 in cell A1.
> > Write =1-A1^2 in a different cell.
> > Write =-A1^2+1 in another cell.
>
> > The two expressions are equivalent, shouldn't they? Well, the former
> > gives -3, the latter gives 5.
>
> --
>
> Dave Peterson
 >> Stay informed about: Notation Bugs 
Back to top
Login to vote
joeu2004

External


Since: Oct 17, 2008
Posts: 2



(Msg. 5) Posted: Fri Oct 17, 2008 5:09 pm
Post subject: Re: Notation Bugs
Archived from groups: per prev. post (more info?)

On Oct 17, 12:54 pm, gciriani wrote:
> Did anybody notice that Excel handles math notations (symbols)
> in an incorrect way?
> Try this: write -2 in cell A1.
> Write =1-A1^2 in a different cell.
> Write =-A1^2+1 in another cell.
> The two expressions are equivalent, shouldn't they?

Using Excel Help, search for "operators", click on "About calculation
operators", then click on "The order ....".

You will see that unary negation is performed before exponentiation.
So the second formula is evaluate as (-A1)^2-1. In contrast, binary
subtraction is performed after exponentiation. So the first formula
is evaluated as 1-(A1^2), which is equivalent to -(A1^2)+1.

When in doubt, fully parenthesize an expression. But I encourage
moderation because too many nested parenthetical expressions can
obscure the formula and lead to other human errors.
 >> Stay informed about: Notation Bugs 
Back to top
Login to vote
gciriani

External


Since: Oct 17, 2008
Posts: 3



(Msg. 6) Posted: Fri Oct 17, 2008 5:11 pm
Post subject: Re: Notation Bugs
Archived from groups: per prev. post (more info?)

On Oct 17, 4:27 pm, Gord Dibben wrote:
> >Did anybody notice that Excel handles math notations (symbols) in an
> >incorrect way?
> >Try this: write -2 in cell A1.
> >Write =1-A1^2 in a different cell.
> >Write =-A1^2+1 in another cell.
>
> >The two expressions are equivalent, shouldn't they? Well, the former
> >gives -3, the latter gives 5.
 >> Stay informed about: Notation Bugs 
Back to top
Login to vote
Dave Peterson

External


Since: Oct 17, 2008
Posts: 38



(Msg. 7) Posted: Fri Oct 17, 2008 7:29 pm
Post subject: Re: Notation Bugs
Archived from groups: per prev. post (more info?)

If you want to play in excel, you'll have to play by its rules. And in this
case, excel actually documents its rules.



gciriani wrote:
>
> On Oct 17, 5:13 pm, Dave Peterson wrote:
> > Look up "Operator precedence" in excel's help.
> >
> > You'll see that it doesn't conform to what you were taught in school (well,
> > probably).
> >
> > I know that I always include parens when I want to make sure the expression does
> > what I want.
> >
> That's exactly what I meant, giving precedence to the negation, over
> the exponent, is not correct. Negation should be treated exactly like
> a subtraction from 0. As you pointed out, this is not the notation we
> were taught in school. The notation learned in school has a reason to
> exist: it is the only one respecting the commutative law of addition
> and subtraction: changing the order of the numbers does not change the
> result:
> A-B = -B+A
>
> You are smart to use parenthesis, to make sure that Excel doesn't get
> it wrong, but what you are doing, is you are interpreting Excel
> peculiar notation rule. Instead it should be Excel interpreting one's
> notations correctly, not the other way around.
>
> > gciriani wrote:
> >
> > > Did anybody notice that Excel handles math notations (symbols) in an
> > > incorrect way?
> > > Try this: write -2 in cell A1.
> > > Write =1-A1^2 in a different cell.
> > > Write =-A1^2+1 in another cell.
> >
> > > The two expressions are equivalent, shouldn't they? Well, the former
> > > gives -3, the latter gives 5.
> >
> > --
> >
> > Dave Peterson
 >> Stay informed about: Notation Bugs 
Back to top
Login to vote
MartinW

External


Since: Oct 18, 2008
Posts: 1



(Msg. 8) Posted: Sat Oct 18, 2008 9:12 am
Post subject: Re: Notation Bugs
Archived from groups: per prev. post (more info?)

Hi Giovanni,

There is nothing odd there at all,
A1^2 is the same as A1*A1
so your formulae are like this

1 - A1 multiplied by A1 (multiplication is done before addition or
subtraction)
so -2 multiplied -2 = 4 and 1 - 4 = -3

-A1 multiplied by -A1 (minus minus 2 is equal to 2) therefore
2 multiplied 2 = 4 and + 1 = 5

That's the standard for all equations, multiplication first
dividion second addition third and subtraction last.

HTH
Martin



"gciriani" wrote in message

> Did anybody notice that Excel handles math notations (symbols) in an
> incorrect way?
> Try this: write -2 in cell A1.
> Write =1-A1^2 in a different cell.
> Write =-A1^2+1 in another cell.
>
> The two expressions are equivalent, shouldn't they? Well, the former
> gives -3, the latter gives 5.
 >> Stay informed about: Notation Bugs 
Back to top
Login to vote
Earl Kiosterud

External


Since: Oct 18, 2008
Posts: 1



(Msg. 9) Posted: Sat Oct 18, 2008 10:15 am
Post subject: Re: Notation Bugs
Archived from groups: per prev. post (more info?)

Joe's post gets to the heart of the issue. The negation operator (-) is near top of the
precedence list, whereas the subtraction operator (also -) is near the bottom. We have to
remember that formulas are not the same as equations. Have lots of parentheses in your
pocket.
 >> Stay informed about: Notation Bugs 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
INDEX MATCH HELL ooops.. I mean HELP! - I know (or at least I think I do) that I can do this with INDEX MATCH. Here is what I want to do. I want to place this formula in cell C4 of Sheet 1. What I want this formula to do is to match the value of B2 of Sheet 1 with a list that is in Sheet 2...

How to create a single line separated by commas from a mat.. - Hello, I've the following problem. I've a table made of several columns. Each colum represents a characteristic regarding to a subject (e.g. Name, Surname, Home Street, etc...). In the rows I put the different people. I need to export these info to a....

Excel password Recovery - Hi All, i forgot my excel password, can any tell me how to recover the password there is any free tool is avail in web, Regards, Deen

Exel 2007: Show row over row - Hello Since our users uses Office 2007 there cames up a very strange issue. Sometimes (and rely sometimes) one row (only one) will show up twice (and only a part of this row will show). The rest of the sheet is ok. If you close and reopen the same sheet...

Excel Licensing? - I have the Student/Teacher version of Office, licensed for 3 machines. And it's installed on three machines and all is well with the world. Almost... My wife was upset with the performance of Vista on her computer so I installed XP on it in a dual boot....
   Windows Help (Home) -> Microsoft Excel All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]