On Fri, 8 May 2009 18:36:08 +0200, "Antonio Vernucci"
wrote:
I think this message can be of interest for those using Excel for antenna
calculations.
Write in one cell: =(-A1^2 + 8) Note: the exponent of A1 is 2 (and not
2+8=10) because Excel performs squaring before summing
Write in another cell: =(8 - A1^2)
They look pretty much the same
But give A1 any non-zero value and see what happen.
73
Tony I0JX
Rome, Italy
It's an INTENTIONAL Microsoft bug. See:
"Formula Returns Unexpected Positive Value"
http://support.microsoft.com/kb/q132686/
Although this article applies to Excel 97 and earlier versions, the
problem is still there in later versions of Excel.
The article indicates that:
"The order of evaluation of operators dictates that a minus
sign (-) used as a negation operator (such as -1) is evaluated
before all other operators. "
which in my opinion, is wrong. The MS order of operations is:
: Range
space Intersection
, Union
- Negation
% Percentage
^ Exponentiation
* or / Multiplication or Division
+ or - Addition or Subtraction
& Text Operator
= = = Comparison Operators
Note that the negation (negative sign) operator comes before any
arithmetic operators.
I haven't checked how Open Office 3 and others do it. My guess(tm) is
that they all treat the negation operator the same as subtraction
which would be (correctly) evaluated AFTER exponentiation,
multiplication, and division.
--
Jeff Liebermann
150 Felker St #D http://www.LearnByDestroying.com
Santa Cruz CA 95060
http://802.11junk.com
Skype: JeffLiebermann AE6KS 831-336-2558