Porter's constant


In mathematics, Porter's constant C arises in the study of the efficiency of the Euclidean algorithm. It is named after J. W. Porter of University College, Cardiff.
Euclid's algorithm finds the greatest common divisor of two positive integers and. Hans Heilbronn proved that the average number of iterations of Euclid's algorithm, for fixed and averaged over all choices of relatively prime integers,
is
Porter showed that the error term in this estimate is a constant, plus a polynomially-small correction, and Donald Knuth evaluated this constant to high accuracy. It is:
where

Approximations

The simple approximations of the Porter's constant accurate up to 3 digits can be found as
accurate up to 4 digits as
and up to 6 digits as