FA-72437 / Check-digit algorithms / Member archive
ISBN-13 conversion keeps the ISBN-10 check character · case 02
Converted numbers end with the old mod-11 check (sometimes X) instead of an EAN check digit.
Case contract
Convert a hyphenated or plain ISBN-10 to ISBN-13. The input must be a valid ISBN-10 (mod 11, X allowed as the final character) or None is returned. The result is "978" + the nine ISBN-10 payload digits + a freshly computed EAN-13 check digit (weights 1,3 alternating from the left).
Why this case matters
Library and retail systems migrate legacy ISBN-10 records to 13-digit EAN identifiers.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression ["829284466X"] | "978829284466X" | "9788292844663" | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗