ACOS Math
Author: Darryl Ellingson
—————————————————————————————————————————–
Numb ->54
Sub ->ACOS Math
From ->DARRYL ELLINGSON (#2)
Date ->08/13/86 02:10:07
If any of you are installing your own modifications to your system that require
even simple math, watch out for this one:
If you have the variable x=10 and the variable y=5 and you use the following
formula:
a=x-y+10
I am sure many of you would say the value of the variable ‘a’ should be 15. In
the world of mathematics, this would be true. However, in the ACOS world the
answer is -5. The formula is NOT evaluated using normal math logic, i.e.
left to right evaluation for equal operators. The formula is treated as:
x minus the sum of y plus 10
In any other world, you would have to specify a=x-(y+10) however not true under
ACOS.
The bottom line is any time you are using a formula, USE PARENTHESIS far beyond
the point of what appears to be absurdity. It can’t hurt. If you wanted the
example formula to evaluate correctly you whould have to specify:
a=(x-y)+10
Try it and you’ll see what I mean.
Darryl