Caculate math expressions