How does one calculate (a/b) % m where a = x1*x2*.... and the numbers x1, x2,.. are quite large.
If we only had to find a % m , we could have easily done that using (x1%m) * (x2%m) *... but if there's something in the denominator 'b' in our case, how does one go about calculating it ?
I read somewhere this being done as (a % (m*b)) / b . I have been wondering if this is true and how do we go about proving it ?