 It is an example of an "algorithm", a step-by-step procedure for performing a calculation according to well-defined rules,
and is one of the oldest algorithms in common use.It can be used to reduce fractions to their simplest form, and is a part of many other number-theoretic and cryptographic calculations.The Euclidean algorithm is based on the principle that the greatest common divisor of two numbers does not change if the larger number is replaced by its difference with the smaller number.