Simplification of expressions and order of operations