Implementation of arithmetic service.