FA-72838 / Check-digit algorithms / Member archive
ESR returns the carry as the check digit · case 03
Only references with final carry 0 or 5 get the right check digit.
Case contract
Swiss ESR/QR reference check digit (modulo 10 recursive): spaces ignored, nonempty ASCII digits required (else None). carry starts at 0 and for each digit becomes T[(carry + digit) mod 10] with T = 0,9,4,6,8,2,7,1,3,5; the check digit is (10 - carry) mod 10.
Why this case matters
Payment slips carry a recursive mod-10 reference that billing systems regenerate for reconciliation.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression ["80"] | 6 | 4 | 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 ↗