[can.general] SIN Validation

tyvng@fornax.UUCP (Vincent Ng) (08/01/89)

Quite a while ago I have seen a formula to validate a given SIN number.
Unfortunately, I have not saved it. Can someone send it to me or post
it out again ? Thanks in advance.

Vincent Ng
School of Computing Science
Simon Fraser University
Burnaby. B.C.

robert@alberta.uucp (Robert Baron) (08/06/89)

In article <50@fornax.UUCP> tyvng@fornax.UUCP (Vincent Ng) writes:
>Quite a while ago I have seen a formula to validate a given SIN number.
>Unfortunately, I have not saved it. Can someone send it to me or post
>it out again ? Thanks in advance.
>
>Vincent Ng
>School of Computing Science
>Simon Fraser University
>Burnaby. B.C.

Let c1, c2, c3, c4, c5, c6, c7, c8, and c9 be the successive digits of
a SIN from left to right.  If the following sum is a multiple of 10, the
SIN is a valid one.

                 c1 + c3 + c5 + c7 + c9 + s2 + s4 + s6 + s8

where,
                 |  2 ci             if ci < 5
            si = |
                 |  2 (ci - 4) - 1   if ci > 4