FAILURE MAP
← Case archive

FA-72582 / Check-digit algorithms / Member archive

Resident ID weights use one power of two too few · case 02

Nearly every identity number is rejected.

Member previewVariant 2 · 3 implementations · 8 checks per implementation

Case contract

Check character of an 18-character resident identity number: seventeen ASCII digits followed by a digit or X (lowercase x accepted). Weights are 2^(17-i) mod 11 for 0-based i; the check character is "10X98765432"[sum % 11]. Return [check character, whether the 18th character matches case-insensitively].

Why this case matters

Account opening flows validate national identity numbers before identity verification.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
regression ["405799197903155930"]["4", false]["7", false]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 ↗