Arithmetic duplication removal