vimwiki/tech/euclidean_algorithm.wiki

17 lines
290 B
Plaintext

= Euclidean Algorithm =
The Euclidean Algorithm is an algorithm for finding the inverse of a number
when working within a modulo.
Steps, represented as psuedo code (for A^-1 = (mod m))
{{{
lhs = m
rhs = A
modulo = 0
while modulo != 1
//lhs = rhs * (int(lhs/rhs)) + remainder
}}}