Arithmetic for printers