
Imagine you want to calculate a/b mod p,where a divides b, and b is prime to p, i.e gcd(b,p)=1,then: (a/b)mod p=a*inv(b,p) mod p.So you get ride of dividing! this is most useful when a and b are really big numbers. for example when you want to find n!/k! mod a prime number p,when k<p.you can easily solve this even when n and k are of order of million.> 