Simplify a calculation