Optimize arithmetic operations.