PRIORITY RULES FOR READING EQUATIONS ----agreed to by humans and computer programming languages!---------- high priority ^ | f(...) (...) parentheses and function-invocations (parentheses implied) | trump everything else. Do stuff inside them | BEFORE stuff outside them. | Helpful note: use both ( and [ parens to make | it easier to match them up: ([()]) | 3 n | x x exponentiation | | x y x / y multiplication & division | | x+y x-y add & subtract V low priority So. If you see sin(q) + x + y / z - d + h / (p+f) That MEANS: 1. perform the sin (highest priority, named function): sin(q) + x + y / z - d + h / (p+f) and the parentheses, FIRST. 2. perform the / : sin(q) + x + (y / z) - d + (h/(p+f)) 3. finally perform the + and -'s. Result is y h sin(q) + x + --- - d + --- z p+f WRONG would be: sin(q+x) + y/z - d + h/(p+f) <-- wrongly doing + before sin! sin(q) + x + y/(z-d) + h/(p+f) <-- wrongly doing - before /! BAD HABITS: Try to avoid writing forms in which there is ambiguous or confusing priority. Nobody is quite sure what you meant in those bad cases. Perhaps including you. ------------------------------------------------------------------------------------ GOOD: BAD SINCE UNCLEAR WHICH GOOD FORM WAS MEANT: ln2 2 ln(2)/3, ln(2/3), ---, ln- ln2/3 <-- I admit our rules would interpret 3 3 this unambiguously as ln(2)/3 but... if 2/3 is a single character (is on some typewriters & fonts) then this would be confusing. Why risk it? a a c ---, ---, a/(bc), ac/b a/bc b c b a + b b a + b -----, a + --- -- c c c 2 2 2 sin(x ), sin(x) sin (x) <-- I admit some books use these, [these not the same thing] but I think they are a bad idea! -1 Why ask for pain? arcsin(x), 1/sin(x) sin (x) <--Ask for clarity instead! L L L ----- ----- ----- \ \ \ ) [sin(k) + 76], 76 + ) sin(k) ) sin(k) + 76 / / / ----- ----- ----- k = F k = F k = F ------------------------------------------------------------------------------------