Update arithmetic.py

generalized functions