ISBN-13 and ISMN validator code calculates checksum across all 13 ISBN/ISMN digits including the check digit. If the number is valid, the result will be 0. Before calling this function, ISBN-13/ISMN must be checked for length and stripped of dashes, spaces and other non-ISxN-13 characters.