## Math visualizations

### How many iterations does gcd(x, y) take?

A theorem of Lamé, Dixon, and Heilbronn states that the average number of iterations of the classical GCD function is

$\frac{12~\mathrm{ln}(2)}{\pi^2} \mathrm{ln}(\mathrm{max}(x, y))$
and the maximum is given by
$\lceil \mathrm{ln}(N \sqrt{5}) / \mathrm{ln}((1 + \sqrt{5}) / 2)\rceil - 2$

• Show maximumStair step upper bound
• Show averageSmooth middle surface
• Show iterationsSpiky surface in the middle