Algorithm-CheckDigits

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

	  assumed it was a definition list, so the numbers after that
	  don't look right."

1.2.0 Fr 8. Jun 11:19:25 CEST 2012
	- reworked Algorithm::CheckDigits::MXX_001.pm, added ABA routing
	  numbers

1.1.2 Fr 8. Jun 09:22:35 CEST 2012
	- added '=encoding iso-8859-1' to M11_004.pm, M11_006.pm,
	  MBase_002.pm, MXX_003.pm, MXX_006.pm. This should prevent
	  failures in the processing of the POD that contain non-ASCII
	  characters.
	- corrected search and replacement lists in M10_011.pm

1.1.1 Do 3. Mar 10:16:59 CET 2011
	- Reworked Algorithm::CheckDigits::M10_008 (sedol) to cop with
	  alphanumerical SEDOL codes that are in use since March 2004.
	- There was also a flaw in the computation of the checksum that
	  provided 10 instead of 0.
	- This closes bug number #66340 on CPAN.

lib/Algorithm/CheckDigits/M10_010.pm  view on Meta::CPAN

  # $bn = '85-12345678'
  
=head1 DESCRIPTION

=head2 ALGORITHM

=over 4

=item 1

The sequence of digits is processed left to right. For the first digit
we assume a carry forward of 0.

=item 2

For each digit d(i) the carry forward cf(i) is the digit at the
the position p in the sequence ( 0, 9, 4, 6, 8, 2, 7, 1, 3, 5 ), where
p is (d(i) + cf(i-1)) modulo 10.

=item 3

lib/Algorithm/CheckDigits/M11_001.pm  view on Meta::CPAN

  # $bn = '3-88229-192-'
  
=head1 DESCRIPTION

=head2 ALGORITHM

=over 4

=item 1

The sequence of digits is processed right to left.
Every digit is multiplied with their position in the sequence (i.e.
the digit left to the check digit has the weight 2 then 3 etc.).

With a Hongkong ID (hkid) the leftmost char is replaced with its
position in the alphabet and then multiplied with 8 (its weight).

=item 2

The sum of all products is computed.

lib/Algorithm/CheckDigits/MXX_005.pm  view on Meta::CPAN

  # $bn = '12345678'
  
=head1 DESCRIPTION

=head2 ALGORITHM

=over 4

=item 1

Digits are processed left to right. For the first digit applies the
balance is 0.

=item 2

The new balance is taken from the balance table according to the
current balance (row) and the digit (column).

=item 3

The check digit is the difference from the last balance to 10 taken



( run in 0.277 second using v1.01-cache-2.11-cpan-8d75d55dd25 )