Compute modular inverse, fast power modulo, and nCr mod p using BigInt precision. One-click C++ snippet output for each operation.
Yes, completely free. No sign-up, no credit card, no usage limits.
Never. Everything runs 100% in your browser. Nothing is uploaded to any server.
Yes. All tools are fully responsive and work on phones, tablets, and desktops.
652541198C++ Implementation
// Fast modular exponentiation
long long modpow(long long base, long long exp, long long mod) {
long long result = 1;
base %= mod;
while (exp > 0) {
if (exp & 1) result = (__int128)result * base % mod;
base = (__int128)base * base % mod;
exp >>= 1;
}
return result;
}