Tuesday, January 02, 2007

Casting Out Nines

How do you check the answer of a large multiplication like 8216*4215=36430440 without actually doing the multiplication.

Sum 8+2+1+6=17. Take modulo 9 = 8.
Sum 4+2+1+5=12. Take modulo 9 = 3.

Sum 3+6+4+3+4+4=24. Take modulo 9 = 6.

Now check 8*3=24 and 2+4 = 6.

2 comments:

Anonymous said...

This means that if u have a no like
36421440...
According to ur calculation it will come out as the rt result...?

Mayank said...

certainly not :) !! i guess this is a necessary condition not a sufficient one. we can use this for a fast random check only to see if this is not satisfied