Library of arithmetic operations on numbers of errors