ISBN checksum digit 
Author Message
 ISBN checksum digit

Here is an apl function to compute the check digit for a book with
an ISBN number  Example 1-555166-953-X is an ISBN number
The last digit in this case X which is roman numeral for 10
which is the check digit. This function computes the check digit.
The 9 digits are used to compute the check digit X which
is weigted by position .

 [0]  Z gets ISBN N,S
 [1] * compute check digit for isbn n
 [2] S gets 10 10 10 10 10 10 10 10 10 encode N
 [3] Z gets S+. x (rotate(1+ iota 9)  * inner product used
 [4] Z gets 11 - (11 | Z)
 [5] go to (Z < 10)/ 0   * exit if check digit is less than 10
 [6] Z gets RO Z         * RO finds roman numeral for digit z
 [7] * example ISBN 155166853  * YIELDS  X
 [8] * example  ISBN 094001633  * YIELDS 8

Function RO is not shown but is also written in APL
as seen on
http://www.*-*-*.com/



Tue, 29 Jun 2004 00:44:54 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Verify ISBN Checksums...

2. UPC & ISBN Checksums?

3. OO-Testing books and Goldberg isbn?

4. ISBN Number Please

5. ISBN for B.O.N. Book

6. ISBN to EAN Conversion

7. Forth and ISBN/ISSNs

8. Validate ISBN

9. Validating ISBN: Regex question

10. Wanted: ISBN for Intel manuals

11. COBOL Source for ISBN #: 0-13-081513-6

12. ISBN numbers, please help!

 

 
Powered by phpBB® Forum Software