Compare outputs for the same input.
Initialising algorithm engine for Algorithm Comparison Tool...
How Algorithm Comparison Tool Works?
The Algorithm Comparison Tool works by running 1 payload through 8 check digit algorithms side by side and showing each result with the algorithm's error detection rates.
- 1Enter a numeric payload.
- 2Select the algorithms to compare.
- 3Compute each check character.
- 4Show single-error and adjacent-swap detection rates per algorithm.
- 5Highlight algorithms that give the same result.
Algorithm Comparison Tool Formula
The comparison output is Row(a) = (f_a(payload), single-error rate_a, transposition rate_a) for each algorithm a.
for a in Algorithms:
check_a = f_a(payload)
single_a = detected substitutions / all substitutions
swap_a = detected adjacent swaps / all adjacent swapsf_ais algorithm a.
Luhn (Mod 10) → 3 GS1 Mod 10 → 5 Verhoeff → 2 Damm → 6 Weighted Mod 11 (2–7) → 3 ISO 7064 MOD 11-2 → 8 ISO 7064 MOD 11,10 → 3 ISO 7064 MOD 97-10 → 92
Algorithm Comparison Tool Conversion Table
The Algorithm Comparison table shows check characters for 4 payloads and measured transposition detection per algorithm.
| Algorithm | 1234567890 | 0000000000 | 9999999999 | 31415926 | Adjacent swaps caught |
|---|---|---|---|---|---|
| Luhn (Mod 10) | 3 | 0 | 0 | 0 | 97.8% |
| GS1 Mod 10 | 5 | 0 | 0 | 5 | 88.9% |
| Verhoeff | 2 | 5 | 3 | 4 | 100.0% |
| Damm | 6 | 0 | 2 | 6 | 100.0% |
| Weighted Mod 11 (2–7) | 3 | 0 | 5 | 8 | 100.0% |
| ISO 7064 MOD 11-2 | 8 | 1 | 1 | 9 | 100.0% |
| ISO 7064 MOD 11,10 | 3 | 1 | 4 | 2 | 97.8% |
| ISO 7064 MOD 97-10 | 92 | 01 | 51 | 42 | 100.0% |
Swap rates are measured over all 630 adjacent swaps of distinct digits in an 8-digit test string.
What is Algorithm Comparison Tool?
An Algorithm Comparison Tool is a tool that shows how different check digit algorithms treat the same input. The comparison makes trade-offs visible: Luhn misses 2.2% of adjacent swaps and GS1 misses 11.1%, while Verhoeff, Damm, and pure prime-modulus systems catch all of them.
Side-by-side output shows that check digits from different schemes are not interchangeable.
What are the uses of Algorithm Comparison Tool?
There are 3 main uses of the Algorithm Comparison Tool, including scheme selection, debugging, and training.
- Scheme selection: Architects pick the algorithm with the right detection rate.
- Debugging: Developers find out which algorithm a legacy system uses.
- Training: Teachers show detection differences with real numbers.