gcd

There's a total of 2 articles.

Euclidean Algorithm → Read more...

The euclidean algorithm finds the greatest common divisor of two numbers. In this article I implement the algorithm from scratch in C++.


Euler's phi function → Read more...

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 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++.