Algorithms_in_C++ 1.0.0
Set of algorithms implemented in C++.
|
Simple implementation of modular multiplicative inverse More...
#include <cassert>
#include <iostream>
Functions | |
uint64_t | imod (uint64_t x, uint64_t y) |
for IO operations | |
static void | test () |
self-test implementations | |
int | main () |
Main function. | |
Simple implementation of modular multiplicative inverse
this algorithm calculates the modular inverse x^{-1} \mod y iteratively
uint64_t imod | ( | uint64_t | x, |
uint64_t | y ) |
for IO operations
for assert
Function imod Calculates the modular inverse of x with respect to y, x^{-1} \mod y
x | number |
y | number |
int main | ( | void | ) |
|
static |