The order of precedence is listed below:
Functions
Parenthetical Expressions ()
^
* and /
+ and -
The * and / have the same precedence,
and the + and - have the same precedence. Items with the same order
of precedence are processed from left to right.
For example,
this expression 5+(8+2)/5 is processed as 8+2=10, followed by 10/5=2,
then 5+2 to give a result of 7.
Functions and parenthetical
expressions always have the highest order of precedence, meaning
that they are processed first.