Evaluating an expression involves calculating the expression's value, by assigning each variable it's value and each function it's returning value and executing the operations indicated by the operators. In the evaluation process you consider the existence of the parentheses, associability and the operators priority:
– firstly it evaluates each expression between parentheses, starting with the most inner parentheses;
– in an expression without parentheses the operations are executed in the order of the priorities of the operators;
– if an expression has a sequence of operators with the same priority consider the associability of the operators.