Modular Inverse Built-In, C++

Viewed 224

There is a very nice way to find a modular inverse (that is, such b that ab ≡ 1 (mod m) for given a and m) in :

b = pow(a, -1, m)

pow is built-in in . Is there something like this in ?

1 Answers

No there is no built-in function in C++ (to answer your question :) ).

Related