I need to find the Modular Multiplicative Inverse of two numbers, who data types are any of the ones offered by Boost's Multiprecision library (gmp_int, cpp_int etc). Is there a built in function to do so? If not, can you explain how to proceed?
Asked
Active
Viewed 267 times
1 Answers
0
Modular multiplicative inverses were added to boost just a few weeks ago. They are not yet in any Boost release (but should be available in 1.70). To use them, you'll need to clone
$ git clone https://github.com/boostorg/integer
into your Boost tree, or clone all of boost and point your include paths to it:
$ git clone --recursive https://github.com/boostorg/boost
$ cd boost/libs/integer
$ git checkout develop

user14717
- 4,757
- 2
- 44
- 68