Search the documentation

Type to search. Use ↑ and ↓ to move, Enter to open.

Euclidean algorithm

Computes gcd(a, b) by repeated division; the extended version also finds Bezout coefficients.

2
projects
2
run in the browser
Defining formula
gcd⁡(a,b)=gcd⁡(b, a mod b)\gcd(a, b) = \gcd(b,\ a \bmod b)

Replace the larger number by the remainder until it is zero; the other number is the gcd.

On this page

Projects that use it

Neighbourhood in the knowledge graph

Euclidean algorithmNumber theory and algebraNumber Theory ExplorerCryptography in CModular arithmeticModular exponentiationPrime sievesPrimality testingEuler's totient functionArithmetic functionsLinear recurrencesCryptography Performance AnalysisSorting Algorithms VisualizationBlock ciphersFinite fieldsCryptographic hash functionsMessage authentication codesRSAArbitrary-precision arithmeticSolvatore
ProjectsConceptsDomainsShow in graph →