Evaluation of algebraic expressions