in reply to Re^9: Faster Luhn Check Digit Calculation?
in thread Faster Luhn Check Digit Calculation?
Careful, is this algorithm well defined for input >=10 !?!
From the docs:
> For example, Standard & Poor's maps A..Z to 10..35 so the LIST to add these valid characters would be (A, 10, B, 11, C, 12, ...)
provided B=11 is on an odd position, what's the formula now to reduce 2*11?
cross total is 4, but 22-9 =13
and if it's even does 11 stay 11 with cross total 2 or do you take it module 10 hence resulting in 1?
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^11: Faster Luhn Check Digit Calculation?
by kschwab (Vicar) on Dec 02, 2018 at 22:51 UTC | |
by LanX (Saint) on Dec 03, 2018 at 00:22 UTC | |
by kschwab (Vicar) on Dec 03, 2018 at 01:11 UTC | |
by LanX (Saint) on Dec 03, 2018 at 02:59 UTC |