LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #11   Report Post  
Posted to microsoft.public.excel.programming,sci.math
external usenet poster
 
Posts: 6
Default Excel Math Bug



=================================================


No break is needed if the reason for the existence of order-of-operation
rules is understood.


Kevin O'Neill

=================================================


"fred" wrote in message ...
So if a physicist writes an equation he has to include the 'rules of
calculation' for others to use it? Give me a break.



"Dik T. Winter" wrote in message
...
In article "fred"

writes:
Do any of you SCI.MATH whizes want to weigh in on this?


Well, contrary to some responders I do not read this in an excel newsgroup
(I have no reason to read such a newsgroup...).

MS Excel calculates "=-5^2" as 25, not as -25.


Yes, that is one of the possibilities.

This is because 'negation' is handled first in Excel. (!?)


Right, there are quite a few programming languages that do the same.

If you put a zero in the equation,
as in "=0-5^2", your answer changes to -25.


Indeed.

Is this in line with standard math rules?


Yup, both are in line with standard math rules. There are no standard
rules about how unary operators are handled.

Is negation different than subtraction?


Yes, indeed.

I've had lots of math and as far as I know
negation and subtraction are the same thing.


When you look at the definition for rings, and stuff like that, you will
find that they are very different. If you look you will find that
a - b
is just shorthand for
a + b'.
where b' is the negative of b. So
0 - 5^2
is shorthand for
0 + (5^2)'

There are more places where some programming languages do not give you
what you thought they should do. Exponentiaton is an example. What is:
a ^ b ^ c?
There is not strict left to right rule in mathematics...

You may wonder, why should I do
a - b + c
from left to right? Well, actually you have to transform it to something
that is basic mathematics:
a + (-b) + c
and now it does not matter what way you do the operations.
where (5^2)' is the negative of 5^2.
--
dik t. winter, cwi, kruislaan 413, 1098 sj amsterdam, nederland,

+31205924131
home: bovenover 215, 1025 jn amsterdam, nederland;

http://www.cwi.nl/~dik/




 
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
Math functions in Excel Farhad Excel Discussion (Misc queries) 2 February 19th 07 04:16 PM
Excel math formula dan Excel Worksheet Functions 4 October 30th 06 04:51 PM
How do I ? math/excel question Madduck Excel Discussion (Misc queries) 3 July 26th 06 05:41 AM
More math than excel, but a fun problem S Davis Excel Worksheet Functions 4 July 6th 06 10:04 PM


All times are GMT +1. The time now is 10:04 PM.

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"