Math and aggregate expressions

Is this duplicate code with lines 14 - 17?