more general arith printer