unify copy-pasted code in arithmetic
unify copy-pasted code in arithmetic


Former-commit-id: cc8c1764c804137c0209a683a132af8152580fa0
HPI-SWA-Lab/SQPyte,HPI-SWA-Lab/SQPyte,HPI-SWA-Lab/SQPyte,HPI-SWA-Lab/SQPyte,HPI-SWA-Lab/SQPyte