Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Excel Math Bug

In a recent multi, multi articled thread on this subject dealing with an
Excel formula =-5^2 returning +25, much discussion centred around precedence
of operations being responsible for the + result
Despite the many theories on this, an Excel formula =-5^3 returns -125.
In fact it would seem that any negative value raised to an EVEN power
retruns a positive result.
Whillst the same negative number raised to an ODD power returns a negative
result.

There are, of course simple workarounds like =0-5^2 and =-(5^2) to retrun
the apporpriate negative result.

However IMHO such inconsistency is still a Bug and is long overdue for a
fix.

Any other thoughts on this?

Regards

John Howard


  #2   Report Post  
Posted to microsoft.public.excel.programming
jaf jaf is offline
external usenet poster
 
Posts: 300
Default Excel Math Bug

Oh no. My calulator has the same bug!
Does Excel own Texas Instr. too?

John

johnf202 at hotmail.com


"John Howard" wrote in message
...
: In a recent multi, multi articled thread on this subject dealing with an
: Excel formula =-5^2 returning +25, much discussion centred around
precedence
: of operations being responsible for the + result
: Despite the many theories on this, an Excel formula =-5^3 returns -125.
: In fact it would seem that any negative value raised to an EVEN power
: retruns a positive result.
: Whillst the same negative number raised to an ODD power returns a negative
: result.
:
: There are, of course simple workarounds like =0-5^2 and =-(5^2) to retrun
: the apporpriate negative result.
:
: However IMHO such inconsistency is still a Bug and is long overdue for a
: fix.
:
: Any other thoughts on this?
:
: Regards
:
: John Howard
:
:


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel Math Bug

It's not an inconsistency... It's simply raising -5 to the 2nd power (-5
x -5 = 25) and -5 to the 3rd power (-5 x -5 x -5 = -125)

I'd suggest the what you really want is -(5^2) if you're aiming for -25


In article ,
"John Howard" wrote:

In a recent multi, multi articled thread on this subject dealing with an
Excel formula =-5^2 returning +25, much discussion centred around precedence
of operations being responsible for the + result
Despite the many theories on this, an Excel formula =-5^3 returns -125.
In fact it would seem that any negative value raised to an EVEN power
retruns a positive result.
Whillst the same negative number raised to an ODD power returns a negative
result.

There are, of course simple workarounds like =0-5^2 and =-(5^2) to retrun
the apporpriate negative result.

However IMHO such inconsistency is still a Bug and is long overdue for a
fix.

Any other thoughts on this?

Regards

John Howard

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Excel Math Bug


Good and valid point, DevArrah.

Many thanks

Regards

John Howard


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 320
Default Excel Math Bug

From Excel's help, the order of operations has negation before
exponentiation. Negation, not subtraction. So, -5^2 considers it as (-5)^2,
so I don't see any bug. Here's the text from help (xl 2003):
Operator Description
: (colon)
(single space)
, (comma)
Reference operators
€“ Negation (as in €“1) <==============this comes before
% Percent
^ Exponentiation <=================this.
* and / Multiplication and division
+ and €“ Addition and subtraction
& Connects two strings of text (concatenation)
= < <= = < Comparison


"John Howard" wrote:

In a recent multi, multi articled thread on this subject dealing with an
Excel formula =-5^2 returning +25, much discussion centred around precedence
of operations being responsible for the + result
Despite the many theories on this, an Excel formula =-5^3 returns -125.
In fact it would seem that any negative value raised to an EVEN power
retruns a positive result.
Whillst the same negative number raised to an ODD power returns a negative
result.

There are, of course simple workarounds like =0-5^2 and =-(5^2) to retrun
the apporpriate negative result.

However IMHO such inconsistency is still a Bug and is long overdue for a
fix.

Any other thoughts on this?

Regards

John Howard





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 733
Default Excel Math Bug

"jaf" wrote...
Oh no. My calulator has the same bug!
Does Excel own Texas Instr. too?


Sorry, this was covered in the referenced thread. If you have a single
display TI calculator, you have a [+/-] key, and -5^2 can be keyed either

5 [+/-] [x^y] 2 [=] returning +5

or

5 [x^y] 2 [=] [+/-] returning -5

but they key sequence

[+/-] 5

gives +5, not -5 since the calculator's accumulator register would start off
as zero, and the initial [+/-] key press wouldn't change [+]0 to -0. So
there's no correspondence between such TI calculators and Excel syntax.

If you're using a TI algebraic calculator, you're wrong. -5^2 returns -25,
while Excel returns +25.


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
Less Excel more Math Ty Excel Worksheet Functions 1 April 16th 11 06:28 AM
Excel can't do basic math?! Steven Sinclair Excel Discussion (Misc queries) 18 August 21st 06 09:42 PM
Excel Math formulas [email protected] Excel Discussion (Misc queries) 2 November 16th 05 03:33 AM
Excel Math Wizards scain2004 Excel Worksheet Functions 3 October 12th 05 12:07 AM
Excel Math Bug fred Excel Programming 170 August 6th 04 10:05 AM


All times are GMT +1. The time now is 10:23 AM.

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

About Us

"It's about Microsoft Excel"