#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Customizing -2^2

Shouldn't minus a squared number be a minus number? In Excel -2^2 = 4. To
keep it negative I have to write -(2^2). It's very easy to make mistakes
because I also work with Quattro Pro which works differently. Is there a way
to customize this in Excel so that -2^2 = -4?

Thanks.


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,389
Default Customizing -2^2

In Excel the negation takes precedence over the power operator.

However, subtraction is a lower priority.
0-2^2
results in -4.

Does that help?


Regards,
Fred.

"Tim Walters" wrote in message
...
Shouldn't minus a squared number be a minus number? In Excel -2^2 = 4. To
keep it negative I have to write -(2^2). It's very easy to make mistakes
because I also work with Quattro Pro which works differently. Is there a
way to customize this in Excel so that -2^2 = -4?

Thanks.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Customizing -2^2


Excel is performing the operations using the standard precendence with
mathematical operations

the order is generally

^ first from left to right
* and / from left to right
+ and - from left to right


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=159950

Microsoft Office Help

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 905
Default Customizing -2^2

"Tim Walters" wrote:
Is there a way to customize this in Excel so that
-2^2 = -4?


No, at least not in Excel 2003. Operator precedence is not configurable.


Shouldn't minus a squared number be a minus number?


Arguing about the correctness (or not) of operator precedence among computer
languages is like arguing about the correctness of the order of
adverbial/verb and adjective/noun among natural languages. At least one
computer language eschewed operator precedence rules altogether. Whose to
say that is wrong?

When you learn a natural language, you learn its peculiar grammar rules as
well as its vocabulary. Similarly with computer languages and applications
like Excel that have a significant language for expressing things.

It is fair to say that Excel's precedence order between unary negation and
exponentiation is different from conventional mathematics. That is neither
"right" nor "wrong". Arguably, it would be "wrong" if Excel was marketed as
a language for expressing mathematics. But I do not believe MS has never
made that claim. (Obviously they shouldn't.)

As far as compatibility among spreadsheet products, Excel's
backward-compatibility models are Multiplan, Lotus and Visicalc, probably in
that order. Those were the market leaders of their day.

A human user must make appropriate adjustments when moving from one product
to another similar product. MS Word is very different from WordPerfect.
Likewise, Excel is different from Quattro Pro, albeit perhaps not quite as
dissimilar in some respects.

However, a QuattroPro-to-Excel converter should handle the differences
appropriately. In particular, the Quattro Pro formula -2^2 should be
converted to the Excel formula -(2^2) or -POWER(2,2). If it is not, that is
a defect in the converter, not a flaw in Excel operator precedence.


----- original message -----

"Tim Walters" wrote in message
...
Shouldn't minus a squared number be a minus number? In Excel -2^2 = 4. To
keep it negative I have to write -(2^2). It's very easy to make mistakes
because I also work with Quattro Pro which works differently. Is there a
way to customize this in Excel so that -2^2 = -4?

Thanks.


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 348
Default Customizing -2^2

Tim Walters wrote:
Shouldn't minus a squared number be a minus number? In Excel -2^2 = 4. To
keep it negative I have to write -(2^2). It's very easy to make mistakes
because I also work with Quattro Pro which works differently. Is there a
way to customize this in Excel so that -2^2 = -4?

Thanks.


In Excel help, type in "order of precedence."
First, Excel negates the 2.
Then it squares -2.
That results in +4.
I can't speak for Quattro Pro, as I haven't used it for years, but
always thought it was a better product than Lotus 1-2-3.

Bill


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Customizing -2^2


"Joe User" <joeu2004 wrote in message
...
"Tim Walters" wrote:
Is there a way to customize this in Excel so that
-2^2 = -4?


No, at least not in Excel 2003. Operator precedence is not configurable.


Shouldn't minus a squared number be a minus number?


Arguing about the correctness (or not) of operator precedence among
computer languages is like arguing about the correctness of the order of
adverbial/verb and adjective/noun among natural languages. At least one
computer language eschewed operator precedence rules altogether. Whose to
say that is wrong?



Surely, if Excel treats -2^2 differently from +0-2^2, one has a right to
claim that it obliges one to use DIFFERENT grammars in the same language.
After all, the two statements are arithmetically identical.



When you learn a natural language, you learn its peculiar grammar rules as
well as its vocabulary. Similarly with computer languages and
applications like Excel that have a significant language for expressing
things.

It is fair to say that Excel's precedence order between unary negation and
exponentiation is different from conventional mathematics. That is
neither "right" nor "wrong". Arguably, it would be "wrong" if Excel was
marketed as a language for expressing mathematics. But I do not believe
MS has never made that claim. (Obviously they shouldn't.)

As far as compatibility among spreadsheet products, Excel's
backward-compatibility models are Multiplan, Lotus and Visicalc, probably
in that order. Those were the market leaders of their day.

A human user must make appropriate adjustments when moving from one
product to another similar product. MS Word is very different from
WordPerfect. Likewise, Excel is different from Quattro Pro, albeit perhaps
not quite as dissimilar in some respects.

However, a QuattroPro-to-Excel converter should handle the differences
appropriately. In particular, the Quattro Pro formula -2^2 should be
converted to the Excel formula -(2^2) or -POWER(2,2). If it is not, that
is a defect in the converter, not a flaw in Excel operator precedence.


----- original message -----

"Tim Walters" wrote in message
...
Shouldn't minus a squared number be a minus number? In Excel -2^2 = 4. To
keep it negative I have to write -(2^2). It's very easy to make mistakes
because I also work with Quattro Pro which works differently. Is there a
way to customize this in Excel so that -2^2 = -4?

Thanks.





  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 905
Default Customizing -2^2

"Tim Walters" wrote:
Surely, if Excel treats -2^2 differently from +0-2^2,
one has a right to claim that it obliges one to use
DIFFERENT grammars in the same language.


Only if you ass-u-me something about the precedence of unary negation.

Excel has only one grammar. And in that grammar, unary negation has
precedence over exponential. If you don't like it, don't use Excel. Do us
all a favor ;-).


After all, the two statements are arithmetically identical.


It is fair to say that the two expressions are identical in the language of
mathematics.


----- original message -----

"Tim Walters" wrote in message
...

"Joe User" <joeu2004 wrote in message
...
"Tim Walters" wrote:
Is there a way to customize this in Excel so that
-2^2 = -4?


No, at least not in Excel 2003. Operator precedence is not configurable.


Shouldn't minus a squared number be a minus number?


Arguing about the correctness (or not) of operator precedence among
computer languages is like arguing about the correctness of the order of
adverbial/verb and adjective/noun among natural languages. At least one
computer language eschewed operator precedence rules altogether. Whose
to say that is wrong?



Surely, if Excel treats -2^2 differently from +0-2^2, one has a right to
claim that it obliges one to use DIFFERENT grammars in the same language.
After all, the two statements are arithmetically identical.



When you learn a natural language, you learn its peculiar grammar rules
as well as its vocabulary. Similarly with computer languages and
applications like Excel that have a significant language for expressing
things.

It is fair to say that Excel's precedence order between unary negation
and exponentiation is different from conventional mathematics. That is
neither "right" nor "wrong". Arguably, it would be "wrong" if Excel was
marketed as a language for expressing mathematics. But I do not believe
MS has never made that claim. (Obviously they shouldn't.)

As far as compatibility among spreadsheet products, Excel's
backward-compatibility models are Multiplan, Lotus and Visicalc, probably
in that order. Those were the market leaders of their day.

A human user must make appropriate adjustments when moving from one
product to another similar product. MS Word is very different from
WordPerfect. Likewise, Excel is different from Quattro Pro, albeit
perhaps not quite as dissimilar in some respects.

However, a QuattroPro-to-Excel converter should handle the differences
appropriately. In particular, the Quattro Pro formula -2^2 should be
converted to the Excel formula -(2^2) or -POWER(2,2). If it is not, that
is a defect in the converter, not a flaw in Excel operator precedence.


----- original message -----

"Tim Walters" wrote in message
...
Shouldn't minus a squared number be a minus number? In Excel -2^2 = 4.
To
keep it negative I have to write -(2^2). It's very easy to make mistakes
because I also work with Quattro Pro which works differently. Is there a
way to customize this in Excel so that -2^2 = -4?

Thanks.






  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 905
Default Customizing -2^2

PS....

"Tim Walters" wrote:
Excel treats -2^2 differently from +0-2^2
[.... But]
the two statements are arithmetically identical


FYI, I notice that the equivalent of -2^2 and 0-2^2 have different results
using the MS Calculator that comes with(?) Win XP, if you perform the
operations left-to-right as you read them.

My point is not to justify Excel's choice of precedence rules, but instead
to debunk your assertion that there is some God-given rule that the two
expressions are "arithmetically identical".

I reiterate.... They are identical in the language of mathematics. Whether
or not they are identical in another language is the prerogative of the
language designer to decide.


----- original message -----

"Joe User" <joeu2004 wrote in message
...
"Tim Walters" wrote:
Surely, if Excel treats -2^2 differently from +0-2^2,
one has a right to claim that it obliges one to use
DIFFERENT grammars in the same language.


Only if you ass-u-me something about the precedence of unary negation.

Excel has only one grammar. And in that grammar, unary negation has
precedence over exponential. If you don't like it, don't use Excel. Do
us all a favor ;-).


After all, the two statements are arithmetically identical.


It is fair to say that the two expressions are identical in the language
of mathematics.


----- original message -----

"Tim Walters" wrote in message
...

"Joe User" <joeu2004 wrote in message
...
"Tim Walters" wrote:
Is there a way to customize this in Excel so that
-2^2 = -4?

No, at least not in Excel 2003. Operator precedence is not
configurable.


Shouldn't minus a squared number be a minus number?

Arguing about the correctness (or not) of operator precedence among
computer languages is like arguing about the correctness of the order of
adverbial/verb and adjective/noun among natural languages. At least one
computer language eschewed operator precedence rules altogether. Whose
to say that is wrong?



Surely, if Excel treats -2^2 differently from +0-2^2, one has a right to
claim that it obliges one to use DIFFERENT grammars in the same language.
After all, the two statements are arithmetically identical.



When you learn a natural language, you learn its peculiar grammar rules
as well as its vocabulary. Similarly with computer languages and
applications like Excel that have a significant language for expressing
things.

It is fair to say that Excel's precedence order between unary negation
and exponentiation is different from conventional mathematics. That is
neither "right" nor "wrong". Arguably, it would be "wrong" if Excel was
marketed as a language for expressing mathematics. But I do not believe
MS has never made that claim. (Obviously they shouldn't.)

As far as compatibility among spreadsheet products, Excel's
backward-compatibility models are Multiplan, Lotus and Visicalc,
probably in that order. Those were the market leaders of their day.

A human user must make appropriate adjustments when moving from one
product to another similar product. MS Word is very different from
WordPerfect. Likewise, Excel is different from Quattro Pro, albeit
perhaps not quite as dissimilar in some respects.

However, a QuattroPro-to-Excel converter should handle the differences
appropriately. In particular, the Quattro Pro formula -2^2 should be
converted to the Excel formula -(2^2) or -POWER(2,2). If it is not,
that is a defect in the converter, not a flaw in Excel operator
precedence.


----- original message -----

"Tim Walters" wrote in message
...
Shouldn't minus a squared number be a minus number? In Excel -2^2 = 4.
To
keep it negative I have to write -(2^2). It's very easy to make
mistakes because I also work with Quattro Pro which works differently.
Is there a way to customize this in Excel so that -2^2 = -4?

Thanks.






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Customizing a dictionary Grant Excel Worksheet Functions 3 September 10th 09 01:22 PM
customizing charts Ben Charts and Charting in Excel 1 September 24th 08 12:19 PM
Customizing trouble canswp Excel Discussion (Misc queries) 0 January 17th 07 12:41 AM
Customizing excel Roro Excel Discussion (Misc queries) 4 March 10th 06 07:43 PM
Customizing ToolBars MIKE MEDLIN Excel Discussion (Misc queries) 0 January 13th 05 12:11 AM


All times are GMT +1. The time now is 04:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"