I'm looking for solution to a problem to calculate modulo of very large number that can contain 25000 digits or less (n) with 10 digit number (m). ( n % m ) ? Pointer to appropriate theory resource ...
While solving problems in SPOJ, I faced cases where I need to take Modulus of Big numbers like Fibonacci with 10^9 + 7 ( say MOD ). Now, consider the following case : (Fib(n) + Fib(6*n-1)) / ...
Given $m$, $a$ and $b$ are very big numbers, how do you calculate $ (a*b)\pmod m$ ? As they are very big number I can not calculate $(a*b)$ directly. So I need another method.