Content deleted Content added
Mindmatrix (talk | contribs) m Reverted edit by 2603:3006:102C:900:EC59:2ECB:8C8D:DC9C (talk) to last version by Rawling |
|||
Line 345:
::- if the check digit needs to be 0, the code instead checks that it is 10
::There used to be a working example, but all the examples were deleted (see "Remove all implementation examples" above) and someone has since added this one instead. [[User:Rawling|Rawling]] ([[User talk:Rawling|talk]]) 10:09, 9 March 2024 (UTC)
== Is the final step in calculating the checksum actually correct? ==
According to the article, the last step is "The check digit is calculated by <math>(10 - (s \bmod 10))</math>". Unfortunately, following this logic, it would be IMPOSSIBLE for the check digit to ever equal 0. The value returned by <math>(s \bmod 10)</math> can only range between 0 and 9. So when you subtract that number from 10, you get a value that ranges between 10 and 1. This set of numbers is completely missing a 0, and it also includes a 10 which is too large for a single digit. The article here doesn't mention how this is to be fixed. I would assume if the output is 10 then it would then just be converted to 0 in an additional final step, but that's not mentioned anywhere in the article, so I'm not sure how that should actually be handled. [[Special:Contributions/73.169.149.34|73.169.149.34]] ([[User talk:73.169.149.34|talk]]) 20:16, 27 September 2024 (UTC)
|