Evaluation of mathematical equations using the shunting-yard algorithm