Split arithmetic functions into a separate module