Compute Math formulas