Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

sign and exponent odditity ... 2

Status
Not open for further replies.

rb1957

Aerospace
Apr 15, 2005
16,001
was just doing a equation that started with "number^4..." then i needed to change the sign ... easy enough "-number^4".

got a positive answer ... excel interprets -number^4 as (-number)^4 ... had to use "-1*number^4"

Quando Omni Flunkus Moritati
 
Replies continue below

Recommended for you

That is very tricky-

=-2^4 returns 16

However, =12-2^4 returns -4 (go figure)

 
This has been discussed before, I think, but here is the official answer:
Excel distinguishes between a subtraction operator vs. a negation operator, as it should. A minus sign without a preceding value must be a negation, which has higher priority than exponentiation.

TTFN
faq731-376
7ofakss

Need help writing a question or understanding a reply? forum1529
 
IRstuff said:
Excel distinguishes between a subtraction operator vs. a negation operator, as it should. A minus sign without a preceding value must be a negation, which has higher priority than exponentiation.

I find it much simpler to consider the negation operation to be a subtraction from zero operation, with the zero implied. Same symbol should carry the same order of operation. Microsoft is the exception here. Mathcad for example will perform the exponention first in this calculation.

When in doubt, insert brackets.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor