Gcd

There's a total of 2 notes tagged with "Gcd".

Mon, Jun 1, 2015

Euclidean Algorithm

The Euclidean Algorithm finds the greatest common divisor of two numbers. In this article I implement the algorithm from scratch in C++.
Mon, Jun 1, 2015

Euler's phi function

*Euler's phi function* represented as $\phi(n)$ gives, for a number $n$, the number of coprimes in the range $[1..n]$; in other words, the quantity of numbers in the range $[1..n]$ whose greatest common divisor with $n$ is the unity. In this article, I try to explain how it works and implement it in C++.