MCPcopy Create free account
hub / github.com/TheAlgorithms/C-Plus-Plus / modInverse

Function modInverse

math/ncr_modulo_p.cpp:66–74  ·  view source on GitHub ↗

Find modular inverse of a modulo m i.e. a number x such that (a*x)%m = 1 * * @param[in] a the number for which the modular inverse is queried * @param[in] m the modulus * @return the inverce of a modulo m, if it exists, -1 otherwise */

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

ncrMethod · 0.85

Calls 1

gcdExtendedFunction · 0.85

Tested by

no test coverage detected