Check if a == b to return double sum, otherwise return regular sum